In [5]:
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import os

from IPython.display import SVG
from IPython.display import HTML

In [8]:
pwd()


Out[8]:
'C:\\Users\\chaithcock\\Documents\\repos\\RushHour\\RushHourPy'

In [7]:
# if needed, set the working directory
os.chdir('../../')

In [9]:
pwd()


Out[9]:
'C:\\Users\\chaithcock\\Documents\\repos\\RushHour\\RushHourPy'

In [10]:
%run constants.py

In [ ]:


In [14]:
%run numpy_neighbors.py
%run numpy_display.py
%run numpy_distance_partition.py

v1 = np.array([blank]*36).reshape(6,6)

v1[2,3:5] = hcar
v1[4,1:3] = hcar
#v1[2:4,0] = vcar
#v1[3:,5] = vtruck
v1

nbrs = state_nbrs(board_to_int(v1),4)
svg = svg_neighborhood(board_to_int(v1),4)
HTML(svg)


Out[14]:
XLXLXLXLXL

In [ ]:


In [7]:
[i for i in range(5)]


Out[7]:
[0, 1, 2, 3, 4]

In [15]:
%run numpy_neighbors.py

In [16]:
%run numpy_generate_states.py

In [17]:
%run numpy_display.py

In [18]:
%run numpy_generate_states.py

In [19]:
%run numpy_components.py

In [ ]:


In [20]:
%run numpy_display.py
%run numpy_neighbors.py

#v1 = np.array([blank]*36).reshape(6,6)

#v1[2,3:5] = hcar
#v1[4,1:3] = hcar
#v1[2:4,0] = vcar
#v1[3:,5] = vtruck
#v1

svg = svg_neighborhood(board_to_int(v1),1)
HTML(svg)


Out[20]:
XLKXLKXLKXLKXLK

Testing State Generation


In [21]:
states_2_2 = generate_states(2,2)

In [22]:
states_2_2[0], len(states_2_2)


Out[22]:
((278879418257689031394712044437504, 1), 116650)

In [23]:
counts = np.array( [np.count_nonzero(int_to_board(x[0])) for x in states_2_2])
counts


Out[23]:
array([10, 10, 10, ..., 10, 10, 10])

In [24]:
np.unique(counts)


Out[24]:
array([10])

In [25]:
%run numpy_components.py

In [26]:
comps = components(states_2_2)

In [57]:


In [27]:
sum([len(g.nodes()) for g in comps])


Out[27]:
116650

In [28]:
len(states_2_2)


Out[28]:
116650

In [29]:
import sys
sys.getsizeof(states_2_2)/(2**20)


Out[29]:
0.9952163696289062

In [263]:
g1 = comps[3]
len(g1.nodes())


Out[263]:
136

In [266]:
g1.node[0]


Out[266]:
{'board_int': 273812529653282047465268057211200,
 'is_soln_state': False,
 'red_col': 1}

In [118]:
#set([x for x in g1.nodes() if g1.node[x]['is_soln_state']])

In [267]:
sum([len(g.nodes()) for g in comps])


Out[267]:
116650

In [268]:
sum([1 for g in comps if len(g.nodes()) == 1])


Out[268]:
18

In [ ]:


In [269]:
%run numpy_distance_partition.py
distance_partition(g1)

In [270]:
g1.graph['distance_partition'].keys()


Out[270]:
dict_keys([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])

In [289]:
import json as json
#json.dumps(g1.__dict__)

g = g1

json_graph = {}


graph = {}
graph['distance_partition'] = {}
for k in g.__dict__['graph']['distance_partition']:
        graph['distance_partition'][k] = list(g.__dict__['graph']['distance_partition'][k])
        
    

json_graph['graph'] = graph
json_graph['nodes'] = {}
for node in g.__dict__['_node']:
    json_graph['nodes'][int(node)] = g.__dict__['_node'][node]

for node in json_graph['nodes']:
    json_graph['nodes'][node]['is_soln_state'] = str.lower(str(json_graph['nodes'][node]['is_soln_state']))
    json_graph['nodes'][node]['board_int'] = str(json_graph['nodes'][node]['board_int'])
    json_graph['nodes'][node]['red_col'] = int( json_graph['nodes'][node]['red_col'] )
    if 'inner_nbrs' in json_graph['nodes'][node]:
        json_graph['nodes'][node]['inner_nbrs'] = list(json_graph['nodes'][node]['inner_nbrs'])
    if 'outer_nbrs' in json_graph['nodes'][node]:
        json_graph['nodes'][node]['outer_nbrs'] = list(json_graph['nodes'][node]['outer_nbrs'])

g.__dict__.keys() ,g.__dict__['graph'].keys()

links = []
for node in g._adj.keys():
    for nbr in g._adj[node].keys():
        if nbr > node:
            edge = {}
            edge['source'] = int(node)
            edge['target'] = int(nbr)
            links.append(edge)

json_graph['links'] = links

In [319]:
#for node in json_graph['nodes']:
#    del( json_graph['nodes'][node]['red_col'])
#g1
#json_graph['nodes'][53]

with open('sample_dump_full_graph.json','a') as f:
    f.write(json.dumps(json_graph))

#[type(k) for k in  g1.__dict__['_node'][16]['red_col']]

In [317]:
#json_graph['graph']
str_json = json.dumps(json_graph['links'])
str_json
#json.dumps(json_graph)
#type(json_graph['nodes'][8]['outer_nbrs'][0])
#json.dumps(json_graph['nodes'])
#[type(x) for x in json_graph['nodes'].keys() ]


Out[317]:
'[{"source": 53, "target": 71}, {"source": 53, "target": 70}, {"source": 71, "target": 93}, {"source": 71, "target": 92}, {"source": 93, "target": 108}, {"source": 93, "target": 98}, {"source": 108, "target": 109}, {"source": 109, "target": 111}, {"source": 70, "target": 92}, {"source": 70, "target": 97}, {"source": 92, "target": 98}, {"source": 92, "target": 99}, {"source": 97, "target": 99}, {"source": 97, "target": 112}, {"source": 97, "target": 113}, {"source": 98, "target": 100}, {"source": 98, "target": 101}, {"source": 99, "target": 101}, {"source": 99, "target": 114}, {"source": 99, "target": 106}, {"source": 100, "target": 108}, {"source": 100, "target": 102}, {"source": 100, "target": 111}, {"source": 101, "target": 102}, {"source": 101, "target": 103}, {"source": 102, "target": 104}, {"source": 102, "target": 115}, {"source": 103, "target": 104}, {"source": 103, "target": 105}, {"source": 103, "target": 106}, {"source": 104, "target": 116}, {"source": 104, "target": 117}, {"source": 114, "target": 120}, {"source": 115, "target": 116}, {"source": 115, "target": 128}, {"source": 116, "target": 131}, {"source": 116, "target": 129}, {"source": 117, "target": 130}, {"source": 117, "target": 129}, {"source": 119, "target": 123}, {"source": 119, "target": 124}, {"source": 119, "target": 122}, {"source": 120, "target": 121}, {"source": 120, "target": 124}, {"source": 121, "target": 126}, {"source": 123, "target": 126}, {"source": 123, "target": 132}, {"source": 124, "target": 126}, {"source": 124, "target": 125}, {"source": 126, "target": 127}, {"source": 31, "target": 55}, {"source": 31, "target": 36}, {"source": 15, "target": 22}, {"source": 15, "target": 23}, {"source": 15, "target": 24}, {"source": 15, "target": 17}, {"source": 22, "target": 26}, {"source": 22, "target": 40}, {"source": 22, "target": 32}, {"source": 23, "target": 31}, {"source": 23, "target": 25}, {"source": 23, "target": 33}, {"source": 23, "target": 32}, {"source": 24, "target": 31}, {"source": 24, "target": 27}, {"source": 30, "target": 31}, {"source": 30, "target": 64}, {"source": 47, "target": 49}, {"source": 60, "target": 62}, {"source": 60, "target": 65}, {"source": 60, "target": 72}, {"source": 60, "target": 76}, {"source": 62, "target": 63}, {"source": 62, "target": 83}, {"source": 63, "target": 72}, {"source": 63, "target": 64}, {"source": 63, "target": 89}, {"source": 65, "target": 73}, {"source": 65, "target": 81}, {"source": 72, "target": 91}, {"source": 73, "target": 74}, {"source": 73, "target": 94}, {"source": 73, "target": 86}, {"source": 74, "target": 75}, {"source": 74, "target": 95}, {"source": 74, "target": 87}, {"source": 75, "target": 96}, {"source": 75, "target": 90}, {"source": 49, "target": 67}, {"source": 76, "target": 91}, {"source": 76, "target": 81}, {"source": 76, "target": 83}, {"source": 28, "target": 30}, {"source": 28, "target": 63}, {"source": 28, "target": 36}, {"source": 34, "target": 65}, {"source": 34, "target": 37}, {"source": 35, "target": 40}, {"source": 35, "target": 37}, {"source": 35, "target": 38}, {"source": 35, "target": 39}, {"source": 16, "target": 62}, {"source": 16, "target": 28}, {"source": 16, "target": 25}, {"source": 16, "target": 19}, {"source": 18, "target": 28}, {"source": 18, "target": 27}, {"source": 18, "target": 20}, {"source": 17, "target": 25}, {"source": 17, "target": 26}, {"source": 17, "target": 27}, {"source": 0, "target": 1}, {"source": 0, "target": 3}, {"source": 0, "target": 2}, {"source": 1, "target": 13}, {"source": 1, "target": 4}, {"source": 1, "target": 10}, {"source": 13, "target": 41}, {"source": 13, "target": 29}, {"source": 13, "target": 14}, {"source": 41, "target": 47}, {"source": 41, "target": 67}, {"source": 41, "target": 46}, {"source": 7, "target": 53}, {"source": 7, "target": 52}, {"source": 8, "target": 52}, {"source": 8, "target": 54}, {"source": 6, "target": 7}, {"source": 6, "target": 8}, {"source": 52, "target": 71}, {"source": 52, "target": 84}, {"source": 54, "target": 66}, {"source": 54, "target": 84}, {"source": 66, "target": 68}, {"source": 66, "target": 85}, {"source": 68, "target": 88}, {"source": 84, "target": 93}, {"source": 84, "target": 85}, {"source": 85, "target": 108}, {"source": 85, "target": 88}, {"source": 25, "target": 60}, {"source": 25, "target": 34}, {"source": 25, "target": 36}, {"source": 26, "target": 34}, {"source": 26, "target": 35}, {"source": 27, "target": 36}, {"source": 3, "target": 9}, {"source": 3, "target": 5}, {"source": 3, "target": 10}, {"source": 33, "target": 60}, {"source": 33, "target": 55}, {"source": 33, "target": 57}, {"source": 33, "target": 58}, {"source": 33, "target": 59}, {"source": 55, "target": 72}, {"source": 55, "target": 64}, {"source": 55, "target": 77}, {"source": 57, "target": 65}, {"source": 57, "target": 78}, {"source": 57, "target": 86}, {"source": 58, "target": 62}, {"source": 58, "target": 64}, {"source": 58, "target": 79}, {"source": 64, "target": 82}, {"source": 50, "target": 69}, {"source": 40, "target": 47}, {"source": 40, "target": 56}, {"source": 40, "target": 44}, {"source": 59, "target": 76}, {"source": 59, "target": 77}, {"source": 59, "target": 78}, {"source": 59, "target": 79}, {"source": 77, "target": 82}, {"source": 77, "target": 91}, {"source": 78, "target": 80}, {"source": 78, "target": 81}, {"source": 128, "target": 131}, {"source": 131, "target": 134}, {"source": 46, "target": 66}, {"source": 46, "target": 48}, {"source": 48, "target": 67}, {"source": 48, "target": 68}, {"source": 12, "target": 17}, {"source": 12, "target": 21}, {"source": 2, "target": 6}, {"source": 2, "target": 4}, {"source": 2, "target": 5}, {"source": 4, "target": 8}, {"source": 4, "target": 12}, {"source": 4, "target": 29}, {"source": 29, "target": 54}, {"source": 29, "target": 46}, {"source": 19, "target": 23}, {"source": 19, "target": 30}, {"source": 19, "target": 58}, {"source": 20, "target": 24}, {"source": 20, "target": 30}, {"source": 9, "target": 15}, {"source": 9, "target": 19}, {"source": 9, "target": 20}, {"source": 9, "target": 11}, {"source": 32, "target": 34}, {"source": 32, "target": 57}, {"source": 32, "target": 56}, {"source": 56, "target": 61}, {"source": 56, "target": 86}, {"source": 61, "target": 69}, {"source": 61, "target": 87}, {"source": 69, "target": 90}, {"source": 44, "target": 49}, {"source": 44, "target": 50}, {"source": 44, "target": 61}, {"source": 118, "target": 122}, {"source": 118, "target": 130}, {"source": 122, "target": 125}, {"source": 122, "target": 132}, {"source": 125, "target": 127}, {"source": 127, "target": 132}, {"source": 130, "target": 133}, {"source": 133, "target": 135}, {"source": 79, "target": 82}, {"source": 79, "target": 83}, {"source": 80, "target": 107}, {"source": 80, "target": 94}, {"source": 80, "target": 86}, {"source": 82, "target": 89}, {"source": 107, "target": 110}, {"source": 105, "target": 117}, {"source": 105, "target": 119}, {"source": 105, "target": 118}, {"source": 106, "target": 119}, {"source": 106, "target": 120}, {"source": 106, "target": 112}, {"source": 89, "target": 91}, {"source": 94, "target": 95}, {"source": 95, "target": 107}, {"source": 95, "target": 96}, {"source": 96, "target": 110}, {"source": 111, "target": 115}, {"source": 112, "target": 121}, {"source": 112, "target": 123}, {"source": 113, "target": 114}, {"source": 113, "target": 121}, {"source": 45, "target": 50}, {"source": 45, "target": 51}, {"source": 81, "target": 94}, {"source": 83, "target": 89}, {"source": 42, "target": 74}, {"source": 42, "target": 61}, {"source": 42, "target": 51}, {"source": 51, "target": 75}, {"source": 51, "target": 69}, {"source": 36, "target": 72}, {"source": 37, "target": 73}, {"source": 37, "target": 56}, {"source": 37, "target": 42}, {"source": 38, "target": 44}, {"source": 38, "target": 45}, {"source": 38, "target": 42}, {"source": 38, "target": 43}, {"source": 5, "target": 12}, {"source": 5, "target": 11}, {"source": 11, "target": 16}, {"source": 11, "target": 18}, {"source": 11, "target": 17}, {"source": 21, "target": 26}, {"source": 21, "target": 29}, {"source": 21, "target": 39}, {"source": 43, "target": 49}, {"source": 43, "target": 48}, {"source": 39, "target": 47}, {"source": 39, "target": 46}, {"source": 39, "target": 43}, {"source": 88, "target": 109}, {"source": 129, "target": 133}, {"source": 129, "target": 134}, {"source": 134, "target": 135}, {"source": 10, "target": 15}, {"source": 10, "target": 12}, {"source": 10, "target": 14}, {"source": 14, "target": 22}, {"source": 14, "target": 47}, {"source": 14, "target": 21}, {"source": 86, "target": 87}, {"source": 87, "target": 107}, {"source": 87, "target": 90}, {"source": 90, "target": 110}]'

In [138]:
type(g.__dict__['graph']['distance_partition'][0])


Out[138]:
set

In [131]:
%run numpy_display.py
#graph_json = nx.readwrite.json_graph.node_link_data(g1)
g1_json = json.dumps(json_graph)


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-131-2fc7711717a5> in <module>()
      1 get_ipython().magic('run numpy_display.py')
      2 #graph_json = nx.readwrite.json_graph.node_link_data(g1)
----> 3 g1_json = json.dumps(json_graph)
      4 

~\AppData\Local\Continuum\anaconda3\lib\json\__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
    229         cls is None and indent is None and separators is None and
    230         default is None and not sort_keys and not kw):
--> 231         return _default_encoder.encode(obj)
    232     if cls is None:
    233         cls = JSONEncoder

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in encode(self, o)
    197         # exceptions aren't as detailed.  The list call should be roughly
    198         # equivalent to the PySequence_Fast that ''.join() would do.
--> 199         chunks = self.iterencode(o, _one_shot=True)
    200         if not isinstance(chunks, (list, tuple)):
    201             chunks = list(chunks)

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in iterencode(self, o, _one_shot)
    255                 self.key_separator, self.item_separator, self.sort_keys,
    256                 self.skipkeys, _one_shot)
--> 257         return _iterencode(o, 0)
    258 
    259 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in default(self, o)
    178         """
    179         raise TypeError("Object of type '%s' is not JSON serializable" %
--> 180                         o.__class__.__name__)
    181 
    182     def encode(self, o):

TypeError: Object of type 'set' is not JSON serializable

In [105]:
g1.__dict__.keys(),
g1.__dict__['_adj']


Out[105]:
{0: {1: {}, 2: {}},
 1: {0: {}, 3: {}, 4: {}, 5: {}},
 2: {0: {}, 5: {}, 8: {}},
 3: {1: {}, 7: {}, 9: {}, 11: {}},
 4: {1: {}, 6: {}, 7: {}},
 5: {1: {}, 2: {}, 9: {}, 10: {}},
 6: {4: {}, 31: {}, 32: {}},
 7: {3: {}, 4: {}, 27: {}, 31: {}},
 8: {2: {}, 10: {}, 17: {}, 18: {}},
 9: {3: {}, 5: {}, 12: {}, 13: {}},
 10: {5: {}, 8: {}, 13: {}, 19: {}, 20: {}},
 11: {3: {}, 12: {}, 27: {}},
 12: {9: {}, 11: {}, 14: {}},
 13: {9: {}, 10: {}, 14: {}, 15: {}, 16: {}},
 14: {12: {}, 13: {}, 21: {}, 22: {}},
 15: {13: {}, 19: {}, 22: {}, 23: {}, 24: {}},
 16: {13: {}, 20: {}, 21: {}, 24: {}},
 17: {8: {}, 20: {}, 25: {}},
 18: {8: {}, 19: {}, 25: {}, 26: {}},
 19: {10: {}, 15: {}, 18: {}, 30: {}, 34: {}},
 20: {10: {}, 16: {}, 17: {}, 30: {}},
 21: {14: {}, 16: {}, 28: {}},
 22: {14: {}, 15: {}, 28: {}, 35: {}, 36: {}},
 23: {15: {}, 29: {}, 34: {}, 36: {}, 37: {}},
 24: {15: {}, 16: {}, 28: {}, 29: {}, 30: {}},
 25: {17: {}, 18: {}, 30: {}, 38: {}},
 26: {18: {}, 34: {}, 38: {}, 39: {}},
 27: {7: {}, 11: {}, 33: {}},
 28: {21: {}, 22: {}, 24: {}, 40: {}, 41: {}},
 29: {23: {}, 24: {}, 41: {}, 42: {}, 43: {}},
 30: {19: {}, 20: {}, 24: {}, 25: {}, 43: {}},
 31: {6: {}, 7: {}, 33: {}, 45: {}},
 32: {6: {}, 44: {}, 45: {}},
 33: {27: {}, 31: {}, 49: {}},
 34: {19: {}, 23: {}, 26: {}, 43: {}, 51: {}},
 35: {22: {}, 40: {}, 52: {}, 53: {}, 54: {}},
 36: {22: {}, 23: {}, 41: {}, 52: {}, 55: {}},
 37: {23: {}, 42: {}, 51: {}, 55: {}},
 38: {25: {}, 26: {}, 43: {}, 50: {}},
 39: {26: {}, 50: {}, 51: {}},
 40: {28: {}, 35: {}, 56: {}, 57: {}, 58: {}},
 41: {28: {}, 29: {}, 36: {}, 56: {}, 59: {}},
 42: {29: {}, 37: {}, 48: {}, 59: {}},
 43: {29: {}, 30: {}, 34: {}, 38: {}, 48: {}},
 44: {32: {}, 46: {}, 47: {}},
 45: {31: {}, 32: {}, 47: {}, 49: {}},
 46: {44: {}, 61: {}, 62: {}, 63: {}},
 47: {44: {}, 45: {}, 60: {}, 61: {}},
 48: {42: {}, 43: {}, 50: {}, 51: {}},
 49: {33: {}, 45: {}, 60: {}},
 50: {38: {}, 39: {}, 48: {}},
 51: {34: {}, 37: {}, 39: {}, 48: {}},
 52: {35: {}, 36: {}, 56: {}, 67: {}, 68: {}, 69: {}},
 53: {35: {}, 57: {}, 68: {}, 70: {}},
 54: {35: {}, 58: {}, 69: {}, 70: {}},
 55: {36: {}, 37: {}, 59: {}, 67: {}},
 56: {40: {}, 41: {}, 52: {}, 74: {}, 76: {}, 77: {}},
 57: {40: {}, 53: {}, 73: {}, 77: {}},
 58: {40: {}, 54: {}, 73: {}, 74: {}},
 59: {41: {}, 42: {}, 55: {}, 76: {}},
 60: {47: {}, 49: {}, 64: {}},
 61: {46: {}, 47: {}, 64: {}, 66: {}, 80: {}},
 62: {46: {}, 65: {}, 80: {}, 81: {}},
 63: {46: {}, 65: {}, 66: {}},
 64: {60: {}, 61: {}, 72: {}, 82: {}},
 65: {62: {}, 63: {}, 71: {}, 83: {}},
 66: {61: {}, 63: {}, 71: {}, 72: {}},
 67: {52: {}, 55: {}, 76: {}, 78: {}, 79: {}},
 68: {52: {}, 53: {}, 75: {}, 77: {}, 78: {}},
 69: {52: {}, 54: {}, 74: {}, 75: {}, 79: {}},
 70: {53: {}, 54: {}, 73: {}, 75: {}},
 71: {65: {}, 66: {}, 80: {}, 84: {}, 85: {}},
 72: {64: {}, 66: {}, 84: {}},
 73: {57: {}, 58: {}, 70: {}, 97: {}},
 74: {56: {}, 58: {}, 69: {}, 97: {}, 98: {}},
 75: {68: {}, 69: {}, 70: {}, 97: {}, 99: {}},
 76: {56: {}, 59: {}, 67: {}, 98: {}, 100: {}},
 77: {56: {}, 57: {}, 68: {}, 97: {}, 100: {}},
 78: {67: {}, 68: {}, 99: {}, 100: {}},
 79: {67: {}, 69: {}, 98: {}, 99: {}},
 80: {61: {}, 62: {}, 71: {}, 82: {}, 87: {}},
 81: {62: {}, 83: {}, 87: {}, 92: {}},
 82: {64: {}, 80: {}, 84: {}, 95: {}, 106: {}},
 83: {65: {}, 81: {}, 85: {}, 90: {}},
 84: {71: {}, 72: {}, 82: {}, 86: {}, 107: {}},
 85: {71: {}, 83: {}, 86: {}, 87: {}, 88: {}},
 86: {84: {}, 85: {}, 91: {}, 95: {}, 108: {}},
 87: {80: {}, 81: {}, 85: {}, 89: {}, 95: {}},
 88: {85: {}, 89: {}, 90: {}, 91: {}},
 89: {87: {}, 88: {}, 92: {}, 94: {}},
 90: {83: {}, 88: {}, 92: {}},
 91: {86: {}, 88: {}, 93: {}, 94: {}},
 92: {81: {}, 89: {}, 90: {}},
 93: {91: {}, 96: {}, 105: {}, 108: {}},
 94: {89: {}, 91: {}, 95: {}, 96: {}},
 95: {82: {}, 86: {}, 87: {}, 94: {}, 102: {}},
 96: {93: {}, 94: {}, 102: {}, 103: {}},
 97: {73: {}, 74: {}, 75: {}, 77: {}, 101: {}},
 98: {74: {}, 76: {}, 79: {}, 101: {}},
 99: {75: {}, 78: {}, 79: {}, 101: {}},
 100: {76: {}, 77: {}, 78: {}, 101: {}},
 101: {97: {}, 98: {}, 99: {}, 100: {}},
 102: {95: {}, 96: {}, 104: {}, 106: {}, 108: {}},
 103: {96: {}, 104: {}, 105: {}},
 104: {102: {}, 103: {}, 109: {}, 110: {}},
 105: {93: {}, 103: {}, 110: {}},
 106: {82: {}, 102: {}, 107: {}, 109: {}},
 107: {84: {}, 106: {}, 108: {}, 111: {}},
 108: {86: {}, 93: {}, 102: {}, 107: {}, 110: {}},
 109: {104: {}, 106: {}, 111: {}},
 110: {104: {}, 105: {}, 108: {}, 111: {}},
 111: {107: {}, 109: {}, 110: {}}}

In [93]:
g1.__dict__.keys(),{'nodes':list(g1.__dict__['nodes'])}


Out[93]:
(dict_keys(['node_dict_factory', 'adjlist_outer_dict_factory', 'adjlist_inner_dict_factory', 'edge_attr_dict_factory', 'graph', '_node', '_adj', 'nodes']),
 {'nodes': [32,
   45,
   49,
   44,
   46,
   47,
   60,
   61,
   62,
   63,
   64,
   65,
   81,
   107,
   108,
   18,
   8,
   58,
   73,
   43,
   37,
   42,
   52,
   55,
   56,
   59,
   69,
   74,
   48,
   40,
   19,
   20,
   0,
   66,
   71,
   72,
   80,
   82,
   84,
   85,
   86,
   87,
   88,
   29,
   36,
   41,
   9,
   12,
   13,
   16,
   15,
   21,
   22,
   95,
   6,
   7,
   4,
   27,
   31,
   33,
   2,
   75,
   79,
   70,
   54,
   25,
   26,
   38,
   39,
   50,
   17,
   1,
   3,
   11,
   78,
   100,
   23,
   24,
   28,
   14,
   99,
   101,
   98,
   83,
   90,
   92,
   93,
   96,
   102,
   103,
   104,
   105,
   106,
   51,
   67,
   76,
   53,
   57,
   5,
   10,
   30,
   34,
   35,
   109,
   110,
   111,
   89,
   91,
   94,
   97,
   68,
   77]})

In [94]:
g1.__dict__.keys() ,g1.__dict__['graph'].keys()


Out[94]:
(dict_keys(['node_dict_factory', 'adjlist_outer_dict_factory', 'adjlist_inner_dict_factory', 'edge_attr_dict_factory', 'graph', '_node', '_adj', 'nodes']),
 dict_keys(['distance_partition']))

In [95]:
g1.__dict__.keys(),g1.__dict__['_node']


Out[95]:
(dict_keys(['node_dict_factory', 'adjlist_outer_dict_factory', 'adjlist_inner_dict_factory', 'edge_attr_dict_factory', 'graph', '_node', '_adj', 'nodes']),
 {0: {'board_int': 162259895803217502823695624700224,
   'inner_nbrs': {1},
   'is_soln_state': False,
   'outer_nbrs': {2},
   'red_col': 1,
   'soln_distance': 4},
  1: {'board_int': 162259895799731068193764519444800,
   'inner_nbrs': {4},
   'is_soln_state': False,
   'outer_nbrs': {0, 5},
   'red_col': 2,
   'soln_distance': 3},
  2: {'board_int': 162259895803223267431218658934784,
   'inner_nbrs': {0, 5},
   'is_soln_state': False,
   'outer_nbrs': {8},
   'red_col': 1,
   'soln_distance': 5},
  3: {'board_int': 618972878888043621331763520,
   'inner_nbrs': {7},
   'is_soln_state': False,
   'outer_nbrs': {9},
   'red_col': 2,
   'soln_distance': 3},
  4: {'board_int': 162259895799295263865023131287872,
   'inner_nbrs': {6},
   'is_soln_state': False,
   'outer_nbrs': {1},
   'red_col': 3,
   'soln_distance': 2},
  5: {'board_int': 162259895799736832801287553679360,
   'inner_nbrs': {1},
   'is_soln_state': False,
   'outer_nbrs': {2, 10},
   'red_col': 2,
   'soln_distance': 4},
  6: {'board_int': 162259895799240788323930457768256,
   'inner_nbrs': {32},
   'is_soln_state': False,
   'outer_nbrs': {4},
   'red_col': 4,
   'soln_distance': 1},
  7: {'board_int': 618972443083714879943606592,
   'inner_nbrs': {31},
   'is_soln_state': False,
   'outer_nbrs': {3},
   'red_col': 3,
   'soln_distance': 2},
  8: {'board_int': 162259897314380541949505043431424,
   'inner_nbrs': {2, 10},
   'is_soln_state': False,
   'outer_nbrs': {17, 18},
   'red_col': 1,
   'soln_distance': 6},
  9: {'board_int': 618972884652651144365998080,
   'inner_nbrs': {3},
   'is_soln_state': False,
   'outer_nbrs': {13},
   'red_col': 2,
   'soln_distance': 4},
  10: {'board_int': 162259897310894107319573938176000,
   'inner_nbrs': {5},
   'is_soln_state': False,
   'outer_nbrs': {8, 19, 20},
   'red_col': 2,
   'soln_distance': 5},
  11: {'board_int': 2859254360683136942400,
   'inner_nbrs': {27},
   'is_soln_state': False,
   'outer_nbrs': {12},
   'red_col': 2,
   'soln_distance': 3},
  12: {'board_int': 2865018968206171176960,
   'inner_nbrs': {11},
   'is_soln_state': False,
   'outer_nbrs': {14},
   'red_col': 2,
   'soln_distance': 4},
  13: {'board_int': 620484041927169430750494720,
   'inner_nbrs': {9},
   'is_soln_state': False,
   'outer_nbrs': {15, 16},
   'red_col': 2,
   'soln_distance': 5},
  14: {'board_int': 1514022293486492555673600,
   'inner_nbrs': {12},
   'is_soln_state': False,
   'outer_nbrs': {21, 22},
   'red_col': 2,
   'soln_distance': 5},
  15: {'board_int': 620484041927169370738393088,
   'inner_nbrs': {13},
   'is_soln_state': False,
   'outer_nbrs': {23, 24},
   'red_col': 2,
   'soln_distance': 6},
  16: {'board_int': 396761296613248835408237690880,
   'inner_nbrs': {13},
   'is_soln_state': False,
   'outer_nbrs': {24},
   'red_col': 2,
   'soln_distance': 6},
  17: {'board_int': 162656038126951863615482530627584,
   'inner_nbrs': {8, 20},
   'is_soln_state': False,
   'outer_nbrs': {25},
   'red_col': 1,
   'soln_distance': 7},
  18: {'board_int': 162259897314380541949445031329792,
   'inner_nbrs': {8, 19},
   'is_soln_state': False,
   'outer_nbrs': {25, 26},
   'red_col': 1,
   'soln_distance': 7},
  19: {'board_int': 162259897310894107319513926074368,
   'inner_nbrs': {10},
   'is_soln_state': False,
   'outer_nbrs': {18, 30, 34},
   'red_col': 2,
   'soln_distance': 6},
  20: {'board_int': 162656038123465428985551425372160,
   'inner_nbrs': {10},
   'is_soln_state': False,
   'outer_nbrs': {17, 30},
   'red_col': 2,
   'soln_distance': 6},
  21: {'board_int': 396142326593615152470042869760,
   'inner_nbrs': {14},
   'is_soln_state': False,
   'outer_nbrs': {28},
   'red_col': 2,
   'soln_distance': 6},
  22: {'board_int': 1514022293486432543571968,
   'inner_nbrs': {14},
   'is_soln_state': False,
   'outer_nbrs': {28, 35, 36},
   'red_col': 2,
   'soln_distance': 6},
  23: {'board_int': 620484041927169363236880384,
   'inner_nbrs': {15},
   'is_soln_state': False,
   'outer_nbrs': {29, 37},
   'red_col': 2,
   'soln_distance': 7},
  24: {'board_int': 396761296613248835348225589248,
   'inner_nbrs': {15, 16},
   'is_soln_state': False,
   'outer_nbrs': {29},
   'red_col': 2,
   'soln_distance': 7},
  25: {'board_int': 162656038126951863615422518525952,
   'inner_nbrs': {17, 18, 30},
   'is_soln_state': False,
   'outer_nbrs': {38},
   'red_col': 1,
   'soln_distance': 8},
  26: {'board_int': 162259897314380541949437529817088,
   'inner_nbrs': {18, 34},
   'is_soln_state': False,
   'outer_nbrs': {38, 39},
   'red_col': 1,
   'soln_distance': 8},
  27: {'board_int': 2423450031941748785472,
   'inner_nbrs': {33},
   'is_soln_state': False,
   'outer_nbrs': {11},
   'red_col': 3,
   'soln_distance': 2},
  28: {'board_int': 396142326593615152410030768128,
   'inner_nbrs': {21, 22},
   'is_soln_state': False,
   'outer_nbrs': {40, 41},
   'red_col': 2,
   'soln_distance': 7},
  29: {'board_int': 396761296613248835340724076544,
   'inner_nbrs': {23, 24},
   'is_soln_state': False,
   'outer_nbrs': {42},
   'red_col': 2,
   'soln_distance': 8},
  30: {'board_int': 162656038123465428985491413270528,
   'inner_nbrs': {19, 20},
   'is_soln_state': False,
   'outer_nbrs': {25, 43},
   'red_col': 2,
   'soln_distance': 7},
  31: {'board_int': 618972388608173787270086976,
   'inner_nbrs': {45},
   'is_soln_state': False,
   'outer_nbrs': {7},
   'red_col': 4,
   'soln_distance': 1},
  32: {'board_int': 162259895799233978881293873578304,
   'is_soln_state': True,
   'outer_nbrs': {6},
   'red_col': 5,
   'soln_distance': 0},
  33: {'board_int': 2368974490849075265856,
   'inner_nbrs': {49},
   'is_soln_state': False,
   'outer_nbrs': {27},
   'red_col': 4,
   'soln_distance': 1},
  34: {'board_int': 162259897310894107319506424561664,
   'inner_nbrs': {19},
   'is_soln_state': False,
   'outer_nbrs': {26, 43, 51},
   'red_col': 2,
   'soln_distance': 7},
  35: {'board_int': 1511661110245032080703488,
   'inner_nbrs': {22},
   'is_soln_state': False,
   'outer_nbrs': {40, 52, 53, 54},
   'red_col': 2,
   'soln_distance': 7},
  36: {'board_int': 1514022293486425042059264,
   'inner_nbrs': {22},
   'is_soln_state': False,
   'outer_nbrs': {41, 52, 55},
   'red_col': 2,
   'soln_distance': 7},
  37: {'board_int': 620484041927169362299191296,
   'inner_nbrs': {23},
   'is_soln_state': False,
   'outer_nbrs': {42},
   'red_col': 2,
   'soln_distance': 8},
  38: {'board_int': 162656038126951863615415017013248,
   'inner_nbrs': {25, 26, 43},
   'is_soln_state': False,
   'outer_nbrs': {50},
   'red_col': 1,
   'soln_distance': 9},
  39: {'board_int': 162259897314380541949436592128000,
   'inner_nbrs': {26, 51},
   'is_soln_state': False,
   'outer_nbrs': {50},
   'red_col': 1,
   'soln_distance': 9},
  40: {'board_int': 396142324232431911009567899648,
   'inner_nbrs': {28, 35},
   'is_soln_state': False,
   'outer_nbrs': {56, 57, 58},
   'red_col': 2,
   'soln_distance': 8},
  41: {'board_int': 396142326593615152402529255424,
   'inner_nbrs': {28, 36},
   'is_soln_state': False,
   'outer_nbrs': {56, 59},
   'red_col': 2,
   'soln_distance': 8},
  42: {'board_int': 396761296613248835339786387456,
   'inner_nbrs': {29, 37},
   'is_soln_state': False,
   'outer_nbrs': set(),
   'red_col': 2,
   'soln_distance': 9},
  43: {'board_int': 162656038123465428985483911757824,
   'inner_nbrs': {30, 34},
   'is_soln_state': False,
   'outer_nbrs': {38, 48},
   'red_col': 2,
   'soln_distance': 8},
  44: {'board_int': 162259895799239743488816907812864,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  45: {'board_int': 618972381798731150685897024,
   'is_soln_state': True,
   'outer_nbrs': {31},
   'red_col': 5,
   'soln_distance': 0},
  46: {'board_int': 162259897310397018007103292309504,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  47: {'board_int': 618972387563338673720131584,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  48: {'board_int': 162656038123465428985482974068736,
   'inner_nbrs': {43, 51},
   'is_soln_state': False,
   'outer_nbrs': {50},
   'red_col': 2,
   'soln_distance': 9},
  49: {'board_int': 2362165048212491075904,
   'is_soln_state': True,
   'outer_nbrs': {33},
   'red_col': 5,
   'soln_distance': 0},
  50: {'board_int': 162656038126951863615414079324160,
   'inner_nbrs': {38, 39, 48},
   'is_soln_state': False,
   'outer_nbrs': set(),
   'red_col': 1,
   'soln_distance': 10},
  51: {'board_int': 162259897310894107319505486872576,
   'inner_nbrs': {34},
   'is_soln_state': False,
   'outer_nbrs': {39, 48},
   'red_col': 2,
   'soln_distance': 8},
  52: {'board_int': 1511661110245024579190784,
   'inner_nbrs': {35, 36},
   'is_soln_state': False,
   'outer_nbrs': {56, 67, 68, 69},
   'red_col': 2,
   'soln_distance': 8},
  53: {'board_int': 1511661101237832826093568,
   'inner_nbrs': {35},
   'is_soln_state': False,
   'outer_nbrs': {57, 68, 70},
   'red_col': 2,
   'soln_distance': 8},
  54: {'board_int': 1515147544874963185958912,
   'inner_nbrs': {35},
   'is_soln_state': False,
   'outer_nbrs': {58, 69, 70},
   'red_col': 1,
   'soln_distance': 8},
  55: {'board_int': 1514022293486424104370176,
   'inner_nbrs': {36},
   'is_soln_state': False,
   'outer_nbrs': {59, 67},
   'red_col': 2,
   'soln_distance': 8},
  56: {'board_int': 396142324232431911002066386944,
   'inner_nbrs': {40, 41, 52},
   'is_soln_state': False,
   'outer_nbrs': {74, 76, 77},
   'red_col': 2,
   'soln_distance': 9},
  57: {'board_int': 396142324232422903810313289728,
   'inner_nbrs': {40, 53},
   'is_soln_state': False,
   'outer_nbrs': {73, 77},
   'red_col': 2,
   'soln_distance': 9},
  58: {'board_int': 396142327718866540940673155072,
   'inner_nbrs': {40, 54},
   'is_soln_state': False,
   'outer_nbrs': {73, 74},
   'red_col': 1,
   'soln_distance': 9},
  59: {'board_int': 396142326593615152401591566336,
   'inner_nbrs': {41, 55},
   'is_soln_state': False,
   'outer_nbrs': {76},
   'red_col': 2,
   'soln_distance': 9},
  60: {'board_int': 2367929655735525310464,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  61: {'board_int': 620483544837856960104628224,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  62: {'board_int': 162259897310397018007043280207872,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  63: {'board_int': 162656038122968339673080779505664,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  64: {'board_int': 1513525204174021909807104,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  65: {'board_int': 162656038122968339673020767404032,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  66: {'board_int': 396761296116159522937591824384,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  67: {'board_int': 1511661110245023641501696,
   'inner_nbrs': {52, 55},
   'is_soln_state': False,
   'outer_nbrs': {76, 78, 79},
   'red_col': 2,
   'soln_distance': 9},
  68: {'board_int': 1511661101237825324580864,
   'inner_nbrs': {52, 53},
   'is_soln_state': False,
   'outer_nbrs': {75, 77, 78},
   'red_col': 2,
   'soln_distance': 9},
  69: {'board_int': 1515147544874955684446208,
   'inner_nbrs': {52, 54},
   'is_soln_state': False,
   'outer_nbrs': {74, 75, 79},
   'red_col': 1,
   'soln_distance': 9},
  70: {'board_int': 1515147535867763931348992,
   'inner_nbrs': {53, 54},
   'is_soln_state': False,
   'outer_nbrs': {73, 75},
   'red_col': 1,
   'soln_distance': 9},
  71: {'board_int': 396761296116159522877579722752,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  72: {'board_int': 396142326096525839999397003264,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  73: {'board_int': 396142327718857533741418545152,
   'inner_nbrs': {57, 58, 70},
   'is_soln_state': False,
   'outer_nbrs': {97},
   'red_col': 1,
   'soln_distance': 10},
  74: {'board_int': 396142327718866540933171642368,
   'inner_nbrs': {56, 58, 69},
   'is_soln_state': False,
   'outer_nbrs': {97, 98},
   'red_col': 1,
   'soln_distance': 10},
  75: {'board_int': 1515147535867756429836288,
   'inner_nbrs': {68, 69, 70},
   'is_soln_state': False,
   'outer_nbrs': {97, 99},
   'red_col': 1,
   'soln_distance': 10},
  76: {'board_int': 396142324232431911001128697856,
   'inner_nbrs': {56, 59, 67},
   'is_soln_state': False,
   'outer_nbrs': {98, 100},
   'red_col': 2,
   'soln_distance': 10},
  77: {'board_int': 396142324232422903802811777024,
   'inner_nbrs': {56, 57, 68},
   'is_soln_state': False,
   'outer_nbrs': {97, 100},
   'red_col': 2,
   'soln_distance': 10},
  78: {'board_int': 1511661101237824386891776,
   'inner_nbrs': {67, 68},
   'is_soln_state': False,
   'outer_nbrs': {99, 100},
   'red_col': 2,
   'soln_distance': 10},
  79: {'board_int': 1515147544874954746757120,
   'inner_nbrs': {67, 69},
   'is_soln_state': False,
   'outer_nbrs': {98, 99},
   'red_col': 1,
   'soln_distance': 10},
  80: {'board_int': 620483544837856900092526592,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  81: {'board_int': 162259897310397018007035778695168,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  82: {'board_int': 1513525204173961897705472,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  83: {'board_int': 162656038122968339673013265891328,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  84: {'board_int': 396142326096525839939384901632,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  85: {'board_int': 396761296116159522870078210048,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  86: {'board_int': 396142326096525839931883388928,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  87: {'board_int': 620483544837856892591013888,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  88: {'board_int': 396761296116159522869140520960,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  89: {'board_int': 620483544837856891653324800,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  90: {'board_int': 162656038122968339673012328202240,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  91: {'board_int': 396142326096525839930945699840,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  92: {'board_int': 162259897310397018007034841006080,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  93: {'board_int': 396142323735342598530482831360,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  94: {'board_int': 1513525204173953458503680,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  95: {'board_int': 1513525204173954396192768,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  96: {'board_int': 1511164020932552995635200,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  97: {'board_int': 396142327718857533733917032448,
   'inner_nbrs': {73, 74, 75, 77},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 1,
   'soln_distance': 11},
  98: {'board_int': 396142327718866540932233953280,
   'inner_nbrs': {74, 76, 79},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 1,
   'soln_distance': 11},
  99: {'board_int': 1515147535867755492147200,
   'inner_nbrs': {75, 78, 79},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 1,
   'soln_distance': 11},
  100: {'board_int': 396142324232422903801874087936,
   'inner_nbrs': {76, 77, 78},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 2,
   'soln_distance': 11},
  101: {'board_int': 396142327718857533732979343360,
   'inner_nbrs': {97, 98, 99, 100},
   'is_soln_state': False,
   'red_col': 1,
   'soln_distance': 12},
  102: {'board_int': 1511164020932553933324288,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  103: {'board_int': 1511164011925353741025280,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  104: {'board_int': 1511164011925354678714368,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  105: {'board_int': 396142323735333591331228221440,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  106: {'board_int': 1511164020932561434836992,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  107: {'board_int': 396142323735342598538922033152,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  108: {'board_int': 396142323735342598531420520448,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  109: {'board_int': 1511164011925362180227072,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  110: {'board_int': 396142323735333591332165910528,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  111: {'board_int': 396142323735333591339667423232,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0}})

In [104]:
g1.__dict__.keys(),
g1.__dict__['_adj']


Out[104]:
{0: {1: {}, 2: {}},
 1: {0: {}, 3: {}, 4: {}, 5: {}},
 2: {0: {}, 5: {}, 8: {}},
 3: {1: {}, 7: {}, 9: {}, 11: {}},
 4: {1: {}, 6: {}, 7: {}},
 5: {1: {}, 2: {}, 9: {}, 10: {}},
 6: {4: {}, 31: {}, 32: {}},
 7: {3: {}, 4: {}, 27: {}, 31: {}},
 8: {2: {}, 10: {}, 17: {}, 18: {}},
 9: {3: {}, 5: {}, 12: {}, 13: {}},
 10: {5: {}, 8: {}, 13: {}, 19: {}, 20: {}},
 11: {3: {}, 12: {}, 27: {}},
 12: {9: {}, 11: {}, 14: {}},
 13: {9: {}, 10: {}, 14: {}, 15: {}, 16: {}},
 14: {12: {}, 13: {}, 21: {}, 22: {}},
 15: {13: {}, 19: {}, 22: {}, 23: {}, 24: {}},
 16: {13: {}, 20: {}, 21: {}, 24: {}},
 17: {8: {}, 20: {}, 25: {}},
 18: {8: {}, 19: {}, 25: {}, 26: {}},
 19: {10: {}, 15: {}, 18: {}, 30: {}, 34: {}},
 20: {10: {}, 16: {}, 17: {}, 30: {}},
 21: {14: {}, 16: {}, 28: {}},
 22: {14: {}, 15: {}, 28: {}, 35: {}, 36: {}},
 23: {15: {}, 29: {}, 34: {}, 36: {}, 37: {}},
 24: {15: {}, 16: {}, 28: {}, 29: {}, 30: {}},
 25: {17: {}, 18: {}, 30: {}, 38: {}},
 26: {18: {}, 34: {}, 38: {}, 39: {}},
 27: {7: {}, 11: {}, 33: {}},
 28: {21: {}, 22: {}, 24: {}, 40: {}, 41: {}},
 29: {23: {}, 24: {}, 41: {}, 42: {}, 43: {}},
 30: {19: {}, 20: {}, 24: {}, 25: {}, 43: {}},
 31: {6: {}, 7: {}, 33: {}, 45: {}},
 32: {6: {}, 44: {}, 45: {}},
 33: {27: {}, 31: {}, 49: {}},
 34: {19: {}, 23: {}, 26: {}, 43: {}, 51: {}},
 35: {22: {}, 40: {}, 52: {}, 53: {}, 54: {}},
 36: {22: {}, 23: {}, 41: {}, 52: {}, 55: {}},
 37: {23: {}, 42: {}, 51: {}, 55: {}},
 38: {25: {}, 26: {}, 43: {}, 50: {}},
 39: {26: {}, 50: {}, 51: {}},
 40: {28: {}, 35: {}, 56: {}, 57: {}, 58: {}},
 41: {28: {}, 29: {}, 36: {}, 56: {}, 59: {}},
 42: {29: {}, 37: {}, 48: {}, 59: {}},
 43: {29: {}, 30: {}, 34: {}, 38: {}, 48: {}},
 44: {32: {}, 46: {}, 47: {}},
 45: {31: {}, 32: {}, 47: {}, 49: {}},
 46: {44: {}, 61: {}, 62: {}, 63: {}},
 47: {44: {}, 45: {}, 60: {}, 61: {}},
 48: {42: {}, 43: {}, 50: {}, 51: {}},
 49: {33: {}, 45: {}, 60: {}},
 50: {38: {}, 39: {}, 48: {}},
 51: {34: {}, 37: {}, 39: {}, 48: {}},
 52: {35: {}, 36: {}, 56: {}, 67: {}, 68: {}, 69: {}},
 53: {35: {}, 57: {}, 68: {}, 70: {}},
 54: {35: {}, 58: {}, 69: {}, 70: {}},
 55: {36: {}, 37: {}, 59: {}, 67: {}},
 56: {40: {}, 41: {}, 52: {}, 74: {}, 76: {}, 77: {}},
 57: {40: {}, 53: {}, 73: {}, 77: {}},
 58: {40: {}, 54: {}, 73: {}, 74: {}},
 59: {41: {}, 42: {}, 55: {}, 76: {}},
 60: {47: {}, 49: {}, 64: {}},
 61: {46: {}, 47: {}, 64: {}, 66: {}, 80: {}},
 62: {46: {}, 65: {}, 80: {}, 81: {}},
 63: {46: {}, 65: {}, 66: {}},
 64: {60: {}, 61: {}, 72: {}, 82: {}},
 65: {62: {}, 63: {}, 71: {}, 83: {}},
 66: {61: {}, 63: {}, 71: {}, 72: {}},
 67: {52: {}, 55: {}, 76: {}, 78: {}, 79: {}},
 68: {52: {}, 53: {}, 75: {}, 77: {}, 78: {}},
 69: {52: {}, 54: {}, 74: {}, 75: {}, 79: {}},
 70: {53: {}, 54: {}, 73: {}, 75: {}},
 71: {65: {}, 66: {}, 80: {}, 84: {}, 85: {}},
 72: {64: {}, 66: {}, 84: {}},
 73: {57: {}, 58: {}, 70: {}, 97: {}},
 74: {56: {}, 58: {}, 69: {}, 97: {}, 98: {}},
 75: {68: {}, 69: {}, 70: {}, 97: {}, 99: {}},
 76: {56: {}, 59: {}, 67: {}, 98: {}, 100: {}},
 77: {56: {}, 57: {}, 68: {}, 97: {}, 100: {}},
 78: {67: {}, 68: {}, 99: {}, 100: {}},
 79: {67: {}, 69: {}, 98: {}, 99: {}},
 80: {61: {}, 62: {}, 71: {}, 82: {}, 87: {}},
 81: {62: {}, 83: {}, 87: {}, 92: {}},
 82: {64: {}, 80: {}, 84: {}, 95: {}, 106: {}},
 83: {65: {}, 81: {}, 85: {}, 90: {}},
 84: {71: {}, 72: {}, 82: {}, 86: {}, 107: {}},
 85: {71: {}, 83: {}, 86: {}, 87: {}, 88: {}},
 86: {84: {}, 85: {}, 91: {}, 95: {}, 108: {}},
 87: {80: {}, 81: {}, 85: {}, 89: {}, 95: {}},
 88: {85: {}, 89: {}, 90: {}, 91: {}},
 89: {87: {}, 88: {}, 92: {}, 94: {}},
 90: {83: {}, 88: {}, 92: {}},
 91: {86: {}, 88: {}, 93: {}, 94: {}},
 92: {81: {}, 89: {}, 90: {}},
 93: {91: {}, 96: {}, 105: {}, 108: {}},
 94: {89: {}, 91: {}, 95: {}, 96: {}},
 95: {82: {}, 86: {}, 87: {}, 94: {}, 102: {}},
 96: {93: {}, 94: {}, 102: {}, 103: {}},
 97: {73: {}, 74: {}, 75: {}, 77: {}, 101: {}},
 98: {74: {}, 76: {}, 79: {}, 101: {}},
 99: {75: {}, 78: {}, 79: {}, 101: {}},
 100: {76: {}, 77: {}, 78: {}, 101: {}},
 101: {97: {}, 98: {}, 99: {}, 100: {}},
 102: {95: {}, 96: {}, 104: {}, 106: {}, 108: {}},
 103: {96: {}, 104: {}, 105: {}},
 104: {102: {}, 103: {}, 109: {}, 110: {}},
 105: {93: {}, 103: {}, 110: {}},
 106: {82: {}, 102: {}, 107: {}, 109: {}},
 107: {84: {}, 106: {}, 108: {}, 111: {}},
 108: {86: {}, 93: {}, 102: {}, 107: {}, 110: {}},
 109: {104: {}, 106: {}, 111: {}},
 110: {104: {}, 105: {}, 108: {}, 111: {}},
 111: {107: {}, 109: {}, 110: {}}}

In [102]:
g1.__dict__.keys(),g1.__dict__['node_dict_factory']


Out[102]:
(dict_keys(['node_dict_factory', 'adjlist_outer_dict_factory', 'adjlist_inner_dict_factory', 'edge_attr_dict_factory', 'graph', '_node', '_adj', 'nodes']),
 dict)

In [70]:
%run numpy_display.py
#graph_json = nx.readwrite.json_graph.node_link_data(g1)
g1_json = graph_json(g1)


Out[70]:
{'directed': False,
 'graph': {},
 'links': [{'source': 32, 'target': 45},
  {'source': 32, 'target': 44},
  {'source': 32, 'target': 6},
  {'source': 45, 'target': 49},
  {'source': 45, 'target': 47},
  {'source': 45, 'target': 31},
  {'source': 49, 'target': 60},
  {'source': 49, 'target': 33},
  {'source': 44, 'target': 46},
  {'source': 44, 'target': 47},
  {'source': 46, 'target': 61},
  {'source': 46, 'target': 62},
  {'source': 46, 'target': 63},
  {'source': 47, 'target': 60},
  {'source': 47, 'target': 61},
  {'source': 60, 'target': 64},
  {'source': 61, 'target': 64},
  {'source': 61, 'target': 66},
  {'source': 61, 'target': 80},
  {'source': 62, 'target': 65},
  {'source': 62, 'target': 81},
  {'source': 62, 'target': 80},
  {'source': 63, 'target': 65},
  {'source': 63, 'target': 66},
  {'source': 64, 'target': 72},
  {'source': 64, 'target': 82},
  {'source': 65, 'target': 71},
  {'source': 65, 'target': 83},
  {'source': 81, 'target': 87},
  {'source': 81, 'target': 83},
  {'source': 81, 'target': 92},
  {'source': 107, 'target': 108},
  {'source': 107, 'target': 84},
  {'source': 107, 'target': 106},
  {'source': 107, 'target': 111},
  {'source': 108, 'target': 86},
  {'source': 108, 'target': 93},
  {'source': 108, 'target': 102},
  {'source': 108, 'target': 110},
  {'source': 18, 'target': 8},
  {'source': 18, 'target': 19},
  {'source': 18, 'target': 25},
  {'source': 18, 'target': 26},
  {'source': 8, 'target': 2},
  {'source': 8, 'target': 17},
  {'source': 8, 'target': 10},
  {'source': 58, 'target': 73},
  {'source': 58, 'target': 74},
  {'source': 58, 'target': 40},
  {'source': 58, 'target': 54},
  {'source': 73, 'target': 70},
  {'source': 73, 'target': 57},
  {'source': 73, 'target': 97},
  {'source': 43, 'target': 48},
  {'source': 43, 'target': 29},
  {'source': 43, 'target': 38},
  {'source': 43, 'target': 30},
  {'source': 43, 'target': 34},
  {'source': 37, 'target': 42},
  {'source': 37, 'target': 55},
  {'source': 37, 'target': 23},
  {'source': 37, 'target': 51},
  {'source': 42, 'target': 59},
  {'source': 42, 'target': 48},
  {'source': 42, 'target': 29},
  {'source': 52, 'target': 56},
  {'source': 52, 'target': 69},
  {'source': 52, 'target': 36},
  {'source': 52, 'target': 67},
  {'source': 52, 'target': 35},
  {'source': 52, 'target': 68},
  {'source': 55, 'target': 59},
  {'source': 55, 'target': 36},
  {'source': 55, 'target': 67},
  {'source': 56, 'target': 74},
  {'source': 56, 'target': 40},
  {'source': 56, 'target': 41},
  {'source': 56, 'target': 76},
  {'source': 56, 'target': 77},
  {'source': 59, 'target': 41},
  {'source': 59, 'target': 76},
  {'source': 69, 'target': 74},
  {'source': 69, 'target': 75},
  {'source': 69, 'target': 79},
  {'source': 69, 'target': 54},
  {'source': 74, 'target': 98},
  {'source': 74, 'target': 97},
  {'source': 48, 'target': 50},
  {'source': 48, 'target': 51},
  {'source': 40, 'target': 28},
  {'source': 40, 'target': 57},
  {'source': 40, 'target': 35},
  {'source': 19, 'target': 15},
  {'source': 19, 'target': 10},
  {'source': 19, 'target': 30},
  {'source': 19, 'target': 34},
  {'source': 20, 'target': 16},
  {'source': 20, 'target': 17},
  {'source': 20, 'target': 10},
  {'source': 20, 'target': 30},
  {'source': 0, 'target': 2},
  {'source': 0, 'target': 1},
  {'source': 66, 'target': 71},
  {'source': 66, 'target': 72},
  {'source': 71, 'target': 80},
  {'source': 71, 'target': 84},
  {'source': 71, 'target': 85},
  {'source': 72, 'target': 84},
  {'source': 80, 'target': 82},
  {'source': 80, 'target': 87},
  {'source': 82, 'target': 84},
  {'source': 82, 'target': 95},
  {'source': 82, 'target': 106},
  {'source': 84, 'target': 86},
  {'source': 85, 'target': 86},
  {'source': 85, 'target': 87},
  {'source': 85, 'target': 88},
  {'source': 85, 'target': 83},
  {'source': 86, 'target': 95},
  {'source': 86, 'target': 91},
  {'source': 87, 'target': 95},
  {'source': 87, 'target': 89},
  {'source': 88, 'target': 90},
  {'source': 88, 'target': 89},
  {'source': 88, 'target': 91},
  {'source': 29, 'target': 41},
  {'source': 29, 'target': 23},
  {'source': 29, 'target': 24},
  {'source': 36, 'target': 41},
  {'source': 36, 'target': 22},
  {'source': 36, 'target': 23},
  {'source': 41, 'target': 28},
  {'source': 9, 'target': 12},
  {'source': 9, 'target': 13},
  {'source': 9, 'target': 3},
  {'source': 9, 'target': 5},
  {'source': 12, 'target': 11},
  {'source': 12, 'target': 14},
  {'source': 13, 'target': 16},
  {'source': 13, 'target': 15},
  {'source': 13, 'target': 14},
  {'source': 13, 'target': 10},
  {'source': 16, 'target': 21},
  {'source': 16, 'target': 24},
  {'source': 15, 'target': 22},
  {'source': 15, 'target': 23},
  {'source': 15, 'target': 24},
  {'source': 21, 'target': 28},
  {'source': 21, 'target': 14},
  {'source': 22, 'target': 28},
  {'source': 22, 'target': 14},
  {'source': 22, 'target': 35},
  {'source': 95, 'target': 102},
  {'source': 95, 'target': 94},
  {'source': 6, 'target': 4},
  {'source': 6, 'target': 31},
  {'source': 7, 'target': 4},
  {'source': 7, 'target': 27},
  {'source': 7, 'target': 31},
  {'source': 7, 'target': 3},
  {'source': 4, 'target': 1},
  {'source': 27, 'target': 33},
  {'source': 27, 'target': 11},
  {'source': 31, 'target': 33},
  {'source': 2, 'target': 5},
  {'source': 75, 'target': 70},
  {'source': 75, 'target': 99},
  {'source': 75, 'target': 97},
  {'source': 75, 'target': 68},
  {'source': 79, 'target': 99},
  {'source': 79, 'target': 98},
  {'source': 79, 'target': 67},
  {'source': 70, 'target': 54},
  {'source': 70, 'target': 53},
  {'source': 54, 'target': 35},
  {'source': 25, 'target': 38},
  {'source': 25, 'target': 17},
  {'source': 25, 'target': 30},
  {'source': 26, 'target': 38},
  {'source': 26, 'target': 39},
  {'source': 26, 'target': 34},
  {'source': 38, 'target': 50},
  {'source': 39, 'target': 50},
  {'source': 39, 'target': 51},
  {'source': 1, 'target': 3},
  {'source': 1, 'target': 5},
  {'source': 3, 'target': 11},
  {'source': 78, 'target': 100},
  {'source': 78, 'target': 99},
  {'source': 78, 'target': 67},
  {'source': 78, 'target': 68},
  {'source': 100, 'target': 101},
  {'source': 100, 'target': 76},
  {'source': 100, 'target': 77},
  {'source': 23, 'target': 34},
  {'source': 24, 'target': 28},
  {'source': 24, 'target': 30},
  {'source': 99, 'target': 101},
  {'source': 101, 'target': 98},
  {'source': 101, 'target': 97},
  {'source': 98, 'target': 76},
  {'source': 83, 'target': 90},
  {'source': 90, 'target': 92},
  {'source': 92, 'target': 89},
  {'source': 93, 'target': 96},
  {'source': 93, 'target': 105},
  {'source': 93, 'target': 91},
  {'source': 96, 'target': 102},
  {'source': 96, 'target': 103},
  {'source': 96, 'target': 94},
  {'source': 102, 'target': 104},
  {'source': 102, 'target': 106},
  {'source': 103, 'target': 104},
  {'source': 103, 'target': 105},
  {'source': 104, 'target': 109},
  {'source': 104, 'target': 110},
  {'source': 105, 'target': 110},
  {'source': 106, 'target': 109},
  {'source': 51, 'target': 34},
  {'source': 67, 'target': 76},
  {'source': 53, 'target': 57},
  {'source': 53, 'target': 35},
  {'source': 53, 'target': 68},
  {'source': 57, 'target': 77},
  {'source': 5, 'target': 10},
  {'source': 109, 'target': 111},
  {'source': 110, 'target': 111},
  {'source': 89, 'target': 94},
  {'source': 91, 'target': 94},
  {'source': 97, 'target': 77},
  {'source': 68, 'target': 77}],
 'multigraph': False,
 'nodes': [{'id': 32, 'outer_nbrs': [6], 'soln_dist': 0},
  {'id': 45, 'outer_nbrs': [31], 'soln_dist': 0},
  {'id': 49, 'outer_nbrs': [33], 'soln_dist': 0},
  {'id': 44, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 46, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 47, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 60, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 61, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 62, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 63, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 64, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 65, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 81, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 107, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 108, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 18, 'inner_nbrs': [8, 19], 'outer_nbrs': [25, 26], 'soln_dist': 7},
  {'id': 8, 'inner_nbrs': [2, 10], 'outer_nbrs': [17, 18], 'soln_dist': 6},
  {'id': 58, 'inner_nbrs': [40, 54], 'outer_nbrs': [73, 74], 'soln_dist': 9},
  {'id': 73, 'inner_nbrs': [57, 58, 70], 'outer_nbrs': [97], 'soln_dist': 10},
  {'id': 43, 'inner_nbrs': [34, 30], 'outer_nbrs': [48, 38], 'soln_dist': 8},
  {'id': 37, 'inner_nbrs': [23], 'outer_nbrs': [42], 'soln_dist': 8},
  {'id': 42, 'inner_nbrs': [37, 29], 'outer_nbrs': [], 'soln_dist': 9},
  {'id': 52,
   'inner_nbrs': [35, 36],
   'outer_nbrs': [56, 67, 68, 69],
   'soln_dist': 8},
  {'id': 55, 'inner_nbrs': [36], 'outer_nbrs': [59, 67], 'soln_dist': 8},
  {'id': 56,
   'inner_nbrs': [40, 41, 52],
   'outer_nbrs': [74, 76, 77],
   'soln_dist': 9},
  {'id': 59, 'inner_nbrs': [41, 55], 'outer_nbrs': [76], 'soln_dist': 9},
  {'id': 69,
   'inner_nbrs': [52, 54],
   'outer_nbrs': [74, 75, 79],
   'soln_dist': 9},
  {'id': 74,
   'inner_nbrs': [56, 58, 69],
   'outer_nbrs': [97, 98],
   'soln_dist': 10},
  {'id': 48, 'inner_nbrs': [43, 51], 'outer_nbrs': [50], 'soln_dist': 9},
  {'id': 40,
   'inner_nbrs': [35, 28],
   'outer_nbrs': [56, 57, 58],
   'soln_dist': 8},
  {'id': 19, 'inner_nbrs': [10], 'outer_nbrs': [34, 18, 30], 'soln_dist': 6},
  {'id': 20, 'inner_nbrs': [10], 'outer_nbrs': [17, 30], 'soln_dist': 6},
  {'id': 0, 'inner_nbrs': [1], 'outer_nbrs': [2], 'soln_dist': 4},
  {'id': 66, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 71, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 72, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 80, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 82, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 84, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 85, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 86, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 87, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 88, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 29, 'inner_nbrs': [24, 23], 'outer_nbrs': [42], 'soln_dist': 8},
  {'id': 36, 'inner_nbrs': [22], 'outer_nbrs': [41, 52, 55], 'soln_dist': 7},
  {'id': 41, 'inner_nbrs': [36, 28], 'outer_nbrs': [56, 59], 'soln_dist': 8},
  {'id': 9, 'inner_nbrs': [3], 'outer_nbrs': [13], 'soln_dist': 4},
  {'id': 12, 'inner_nbrs': [11], 'outer_nbrs': [14], 'soln_dist': 4},
  {'id': 13, 'inner_nbrs': [9], 'outer_nbrs': [16, 15], 'soln_dist': 5},
  {'id': 16, 'inner_nbrs': [13], 'outer_nbrs': [24], 'soln_dist': 6},
  {'id': 15, 'inner_nbrs': [13], 'outer_nbrs': [24, 23], 'soln_dist': 6},
  {'id': 21, 'inner_nbrs': [14], 'outer_nbrs': [28], 'soln_dist': 6},
  {'id': 22, 'inner_nbrs': [14], 'outer_nbrs': [35, 36, 28], 'soln_dist': 6},
  {'id': 95, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 6, 'inner_nbrs': [32], 'outer_nbrs': [4], 'soln_dist': 1},
  {'id': 7, 'inner_nbrs': [31], 'outer_nbrs': [3], 'soln_dist': 2},
  {'id': 4, 'inner_nbrs': [6], 'outer_nbrs': [1], 'soln_dist': 2},
  {'id': 27, 'inner_nbrs': [33], 'outer_nbrs': [11], 'soln_dist': 2},
  {'id': 31, 'inner_nbrs': [45], 'outer_nbrs': [7], 'soln_dist': 1},
  {'id': 33, 'inner_nbrs': [49], 'outer_nbrs': [27], 'soln_dist': 1},
  {'id': 2, 'inner_nbrs': [0, 5], 'outer_nbrs': [8], 'soln_dist': 5},
  {'id': 75,
   'inner_nbrs': [68, 69, 70],
   'outer_nbrs': [97, 99],
   'soln_dist': 10},
  {'id': 79, 'inner_nbrs': [67, 69], 'outer_nbrs': [98, 99], 'soln_dist': 10},
  {'id': 70, 'inner_nbrs': [53, 54], 'outer_nbrs': [73, 75], 'soln_dist': 9},
  {'id': 54, 'inner_nbrs': [35], 'outer_nbrs': [58, 69, 70], 'soln_dist': 8},
  {'id': 25, 'inner_nbrs': [17, 18, 30], 'outer_nbrs': [38], 'soln_dist': 8},
  {'id': 26, 'inner_nbrs': [18, 34], 'outer_nbrs': [38, 39], 'soln_dist': 8},
  {'id': 38, 'inner_nbrs': [25, 26, 43], 'outer_nbrs': [50], 'soln_dist': 9},
  {'id': 39, 'inner_nbrs': [26, 51], 'outer_nbrs': [50], 'soln_dist': 9},
  {'id': 50, 'inner_nbrs': [48, 38, 39], 'outer_nbrs': [], 'soln_dist': 10},
  {'id': 17, 'inner_nbrs': [8, 20], 'outer_nbrs': [25], 'soln_dist': 7},
  {'id': 1, 'inner_nbrs': [4], 'outer_nbrs': [0, 5], 'soln_dist': 3},
  {'id': 3, 'inner_nbrs': [7], 'outer_nbrs': [9], 'soln_dist': 3},
  {'id': 11, 'inner_nbrs': [27], 'outer_nbrs': [12], 'soln_dist': 3},
  {'id': 78, 'inner_nbrs': [67, 68], 'outer_nbrs': [99, 100], 'soln_dist': 10},
  {'id': 100,
   'inner_nbrs': [76, 77, 78],
   'outer_nbrs': [101],
   'soln_dist': 11},
  {'id': 23, 'inner_nbrs': [15], 'outer_nbrs': [29, 37], 'soln_dist': 7},
  {'id': 24, 'inner_nbrs': [16, 15], 'outer_nbrs': [29], 'soln_dist': 7},
  {'id': 28, 'inner_nbrs': [21, 22], 'outer_nbrs': [40, 41], 'soln_dist': 7},
  {'id': 14, 'inner_nbrs': [12], 'outer_nbrs': [21, 22], 'soln_dist': 5},
  {'id': 99, 'inner_nbrs': [75, 78, 79], 'outer_nbrs': [101], 'soln_dist': 11},
  {'id': 101, 'inner_nbrs': [97, 98, 99, 100], 'soln_dist': 12},
  {'id': 98, 'inner_nbrs': [74, 76, 79], 'outer_nbrs': [101], 'soln_dist': 11},
  {'id': 83, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 90, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 92, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 93, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 96, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 102, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 103, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 104, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 105, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 106, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 51, 'inner_nbrs': [34], 'outer_nbrs': [48, 39], 'soln_dist': 8},
  {'id': 67,
   'inner_nbrs': [52, 55],
   'outer_nbrs': [76, 78, 79],
   'soln_dist': 9},
  {'id': 76,
   'inner_nbrs': [56, 59, 67],
   'outer_nbrs': [98, 100],
   'soln_dist': 10},
  {'id': 53, 'inner_nbrs': [35], 'outer_nbrs': [57, 68, 70], 'soln_dist': 8},
  {'id': 57, 'inner_nbrs': [40, 53], 'outer_nbrs': [73, 77], 'soln_dist': 9},
  {'id': 5, 'inner_nbrs': [1], 'outer_nbrs': [2, 10], 'soln_dist': 4},
  {'id': 10, 'inner_nbrs': [5], 'outer_nbrs': [8, 19, 20], 'soln_dist': 5},
  {'id': 30, 'inner_nbrs': [19, 20], 'outer_nbrs': [25, 43], 'soln_dist': 7},
  {'id': 34, 'inner_nbrs': [19], 'outer_nbrs': [51, 26, 43], 'soln_dist': 7},
  {'id': 35,
   'inner_nbrs': [22],
   'outer_nbrs': [40, 52, 53, 54],
   'soln_dist': 7},
  {'id': 109, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 110, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 111, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 89, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 91, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 94, 'outer_nbrs': [], 'soln_dist': 0},
  {'id': 97,
   'inner_nbrs': [73, 74, 75, 77],
   'outer_nbrs': [101],
   'soln_dist': 11},
  {'id': 68,
   'inner_nbrs': [52, 53],
   'outer_nbrs': [75, 77, 78],
   'soln_dist': 9},
  {'id': 77,
   'inner_nbrs': [56, 57, 68],
   'outer_nbrs': [97, 100],
   'soln_dist': 10}]}

In [69]:
g1.edges()


Out[69]:
EdgeView([(32, 45), (32, 44), (32, 6), (45, 49), (45, 47), (45, 31), (49, 60), (49, 33), (44, 46), (44, 47), (46, 61), (46, 62), (46, 63), (47, 60), (47, 61), (60, 64), (61, 64), (61, 66), (61, 80), (62, 65), (62, 81), (62, 80), (63, 65), (63, 66), (64, 72), (64, 82), (65, 71), (65, 83), (81, 87), (81, 83), (81, 92), (107, 108), (107, 84), (107, 106), (107, 111), (108, 86), (108, 93), (108, 102), (108, 110), (18, 8), (18, 19), (18, 25), (18, 26), (8, 2), (8, 17), (8, 10), (58, 73), (58, 74), (58, 40), (58, 54), (73, 70), (73, 57), (73, 97), (43, 48), (43, 29), (43, 38), (43, 30), (43, 34), (37, 42), (37, 55), (37, 23), (37, 51), (42, 59), (42, 48), (42, 29), (52, 56), (52, 69), (52, 36), (52, 67), (52, 35), (52, 68), (55, 59), (55, 36), (55, 67), (56, 74), (56, 40), (56, 41), (56, 76), (56, 77), (59, 41), (59, 76), (69, 74), (69, 75), (69, 79), (69, 54), (74, 98), (74, 97), (48, 50), (48, 51), (40, 28), (40, 57), (40, 35), (19, 15), (19, 10), (19, 30), (19, 34), (20, 16), (20, 17), (20, 10), (20, 30), (0, 2), (0, 1), (66, 71), (66, 72), (71, 80), (71, 84), (71, 85), (72, 84), (80, 82), (80, 87), (82, 84), (82, 95), (82, 106), (84, 86), (85, 86), (85, 87), (85, 88), (85, 83), (86, 95), (86, 91), (87, 95), (87, 89), (88, 90), (88, 89), (88, 91), (29, 41), (29, 23), (29, 24), (36, 41), (36, 22), (36, 23), (41, 28), (9, 12), (9, 13), (9, 3), (9, 5), (12, 11), (12, 14), (13, 16), (13, 15), (13, 14), (13, 10), (16, 21), (16, 24), (15, 22), (15, 23), (15, 24), (21, 28), (21, 14), (22, 28), (22, 14), (22, 35), (95, 102), (95, 94), (6, 4), (6, 31), (7, 4), (7, 27), (7, 31), (7, 3), (4, 1), (27, 33), (27, 11), (31, 33), (2, 5), (75, 70), (75, 99), (75, 97), (75, 68), (79, 99), (79, 98), (79, 67), (70, 54), (70, 53), (54, 35), (25, 38), (25, 17), (25, 30), (26, 38), (26, 39), (26, 34), (38, 50), (39, 50), (39, 51), (1, 3), (1, 5), (3, 11), (78, 100), (78, 99), (78, 67), (78, 68), (100, 101), (100, 76), (100, 77), (23, 34), (24, 28), (24, 30), (99, 101), (101, 98), (101, 97), (98, 76), (83, 90), (90, 92), (92, 89), (93, 96), (93, 105), (93, 91), (96, 102), (96, 103), (96, 94), (102, 104), (102, 106), (103, 104), (103, 105), (104, 109), (104, 110), (105, 110), (106, 109), (51, 34), (67, 76), (53, 57), (53, 35), (53, 68), (57, 77), (5, 10), (109, 111), (110, 111), (89, 94), (91, 94), (97, 77), (68, 77)])

In [163]:
type(graph_json['graph']['distance_partition'][0])


Out[163]:
set

In [177]:
graph_json?

In [40]:
for x in g1.nodes:
    print(x)


32
45
49
44
46
47
60
61
62
63
64
65
81
107
108
18
8
58
73
43
37
42
52
55
56
59
69
74
48
40
19
20
0
66
71
72
80
82
84
85
86
87
88
29
36
41
9
12
13
16
15
21
22
95
6
7
4
27
31
33
2
75
79
70
54
25
26
38
39
50
17
1
3
11
78
100
23
24
28
14
99
101
98
83
90
92
93
96
102
103
104
105
106
51
67
76
53
57
5
10
30
34
35
109
110
111
89
91
94
97
68
77

In [176]:
import json
with open("graph.json",'w') as outfile:
    json.dump(graph_json,outfile)


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-176-eb3f5729b548> in <module>()
      1 import json
      2 with open("graph.json",'w') as outfile:
----> 3     json.dump(graph_json,outfile)

~\AppData\Local\Continuum\anaconda3\lib\json\__init__.py in dump(obj, fp, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
    177     # could accelerate with writelines in some versions of Python, at
    178     # a debuggability cost
--> 179     for chunk in iterable:
    180         fp.write(chunk)
    181 

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in _iterencode(o, _current_indent_level)
    428             yield from _iterencode_list(o, _current_indent_level)
    429         elif isinstance(o, dict):
--> 430             yield from _iterencode_dict(o, _current_indent_level)
    431         else:
    432             if markers is not None:

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in _iterencode_dict(dct, _current_indent_level)
    402                 else:
    403                     chunks = _iterencode(value, _current_indent_level)
--> 404                 yield from chunks
    405         if newline_indent is not None:
    406             _current_indent_level -= 1

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in _iterencode_list(lst, _current_indent_level)
    323                 else:
    324                     chunks = _iterencode(value, _current_indent_level)
--> 325                 yield from chunks
    326         if newline_indent is not None:
    327             _current_indent_level -= 1

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in _iterencode_dict(dct, _current_indent_level)
    402                 else:
    403                     chunks = _iterencode(value, _current_indent_level)
--> 404                 yield from chunks
    405         if newline_indent is not None:
    406             _current_indent_level -= 1

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in _iterencode(o, _current_indent_level)
    435                     raise ValueError("Circular reference detected")
    436                 markers[markerid] = o
--> 437             o = _default(o)
    438             yield from _iterencode(o, _current_indent_level)
    439             if markers is not None:

~\AppData\Local\Continuum\anaconda3\lib\json\encoder.py in default(self, o)
    178         """
    179         raise TypeError("Object of type '%s' is not JSON serializable" %
--> 180                         o.__class__.__name__)
    181 
    182     def encode(self, o):

TypeError: Object of type 'bool_' is not JSON serializable

In [146]:
graph_json


Out[146]:
{'directed': False,
 'graph': {'distance_partition': {0: {32,
    44,
    45,
    46,
    47,
    49,
    60,
    61,
    62,
    63,
    64,
    65,
    66,
    71,
    72,
    80,
    81,
    82,
    83,
    84,
    85,
    86,
    87,
    88,
    89,
    90,
    91,
    92,
    93,
    94,
    95,
    96,
    102,
    103,
    104,
    105,
    106,
    107,
    108,
    109,
    110,
    111},
   1: {6, 31, 33},
   2: {4, 7, 27},
   3: {1, 3, 11},
   4: {0, 5, 9, 12},
   5: {2, 10, 13, 14},
   6: {8, 15, 16, 19, 20, 21, 22},
   7: {17, 18, 23, 24, 28, 30, 34, 35, 36},
   8: {25, 26, 29, 37, 40, 41, 43, 51, 52, 53, 54, 55},
   9: {38, 39, 42, 48, 56, 57, 58, 59, 67, 68, 69, 70},
   10: {50, 73, 74, 75, 76, 77, 78, 79},
   11: {97, 98, 99, 100},
   12: {101}}},
 'links': [{'foo': 3, 'source': 32, 'target': 45},
  {'source': 32, 'target': 44},
  {'source': 32, 'target': 6},
  {'source': 45, 'target': 49},
  {'source': 45, 'target': 47},
  {'source': 45, 'target': 31},
  {'source': 49, 'target': 60},
  {'source': 49, 'target': 33},
  {'source': 44, 'target': 46},
  {'source': 44, 'target': 47},
  {'source': 46, 'target': 61},
  {'source': 46, 'target': 62},
  {'source': 46, 'target': 63},
  {'source': 47, 'target': 60},
  {'source': 47, 'target': 61},
  {'source': 60, 'target': 64},
  {'source': 61, 'target': 64},
  {'source': 61, 'target': 66},
  {'source': 61, 'target': 80},
  {'source': 62, 'target': 65},
  {'source': 62, 'target': 81},
  {'source': 62, 'target': 80},
  {'source': 63, 'target': 65},
  {'source': 63, 'target': 66},
  {'source': 64, 'target': 72},
  {'source': 64, 'target': 82},
  {'source': 65, 'target': 71},
  {'source': 65, 'target': 83},
  {'source': 81, 'target': 87},
  {'source': 81, 'target': 83},
  {'source': 81, 'target': 92},
  {'source': 107, 'target': 108},
  {'source': 107, 'target': 84},
  {'source': 107, 'target': 106},
  {'source': 107, 'target': 111},
  {'source': 108, 'target': 86},
  {'source': 108, 'target': 93},
  {'source': 108, 'target': 102},
  {'source': 108, 'target': 110},
  {'source': 18, 'target': 8},
  {'source': 18, 'target': 19},
  {'source': 18, 'target': 25},
  {'source': 18, 'target': 26},
  {'source': 8, 'target': 2},
  {'source': 8, 'target': 17},
  {'source': 8, 'target': 10},
  {'source': 58, 'target': 73},
  {'source': 58, 'target': 74},
  {'source': 58, 'target': 40},
  {'source': 58, 'target': 54},
  {'source': 73, 'target': 70},
  {'source': 73, 'target': 57},
  {'source': 73, 'target': 97},
  {'source': 43, 'target': 48},
  {'source': 43, 'target': 29},
  {'source': 43, 'target': 38},
  {'source': 43, 'target': 30},
  {'source': 43, 'target': 34},
  {'source': 37, 'target': 42},
  {'source': 37, 'target': 55},
  {'source': 37, 'target': 23},
  {'source': 37, 'target': 51},
  {'source': 42, 'target': 59},
  {'source': 42, 'target': 48},
  {'source': 42, 'target': 29},
  {'source': 52, 'target': 56},
  {'source': 52, 'target': 69},
  {'source': 52, 'target': 36},
  {'source': 52, 'target': 67},
  {'source': 52, 'target': 35},
  {'source': 52, 'target': 68},
  {'source': 55, 'target': 59},
  {'source': 55, 'target': 36},
  {'source': 55, 'target': 67},
  {'source': 56, 'target': 74},
  {'source': 56, 'target': 40},
  {'source': 56, 'target': 41},
  {'source': 56, 'target': 76},
  {'source': 56, 'target': 77},
  {'source': 59, 'target': 41},
  {'source': 59, 'target': 76},
  {'source': 69, 'target': 74},
  {'source': 69, 'target': 75},
  {'source': 69, 'target': 79},
  {'source': 69, 'target': 54},
  {'source': 74, 'target': 98},
  {'source': 74, 'target': 97},
  {'source': 48, 'target': 50},
  {'source': 48, 'target': 51},
  {'source': 40, 'target': 28},
  {'source': 40, 'target': 57},
  {'source': 40, 'target': 35},
  {'source': 19, 'target': 15},
  {'source': 19, 'target': 10},
  {'source': 19, 'target': 30},
  {'source': 19, 'target': 34},
  {'source': 20, 'target': 16},
  {'source': 20, 'target': 17},
  {'source': 20, 'target': 10},
  {'source': 20, 'target': 30},
  {'source': 0, 'target': 2},
  {'source': 0, 'target': 1},
  {'source': 66, 'target': 71},
  {'source': 66, 'target': 72},
  {'source': 71, 'target': 80},
  {'source': 71, 'target': 84},
  {'source': 71, 'target': 85},
  {'source': 72, 'target': 84},
  {'source': 80, 'target': 82},
  {'source': 80, 'target': 87},
  {'source': 82, 'target': 84},
  {'source': 82, 'target': 95},
  {'source': 82, 'target': 106},
  {'source': 84, 'target': 86},
  {'source': 85, 'target': 86},
  {'source': 85, 'target': 87},
  {'source': 85, 'target': 88},
  {'source': 85, 'target': 83},
  {'source': 86, 'target': 95},
  {'source': 86, 'target': 91},
  {'source': 87, 'target': 95},
  {'source': 87, 'target': 89},
  {'source': 88, 'target': 90},
  {'source': 88, 'target': 89},
  {'source': 88, 'target': 91},
  {'source': 29, 'target': 41},
  {'source': 29, 'target': 23},
  {'source': 29, 'target': 24},
  {'source': 36, 'target': 41},
  {'source': 36, 'target': 22},
  {'source': 36, 'target': 23},
  {'source': 41, 'target': 28},
  {'source': 9, 'target': 12},
  {'source': 9, 'target': 13},
  {'source': 9, 'target': 3},
  {'source': 9, 'target': 5},
  {'source': 12, 'target': 11},
  {'source': 12, 'target': 14},
  {'source': 13, 'target': 16},
  {'source': 13, 'target': 15},
  {'source': 13, 'target': 14},
  {'source': 13, 'target': 10},
  {'source': 16, 'target': 21},
  {'source': 16, 'target': 24},
  {'source': 15, 'target': 22},
  {'source': 15, 'target': 23},
  {'source': 15, 'target': 24},
  {'source': 21, 'target': 28},
  {'source': 21, 'target': 14},
  {'source': 22, 'target': 28},
  {'source': 22, 'target': 14},
  {'source': 22, 'target': 35},
  {'source': 95, 'target': 102},
  {'source': 95, 'target': 94},
  {'source': 6, 'target': 4},
  {'source': 6, 'target': 31},
  {'source': 7, 'target': 4},
  {'source': 7, 'target': 27},
  {'source': 7, 'target': 31},
  {'source': 7, 'target': 3},
  {'source': 4, 'target': 1},
  {'source': 27, 'target': 33},
  {'source': 27, 'target': 11},
  {'source': 31, 'target': 33},
  {'source': 2, 'target': 5},
  {'source': 75, 'target': 70},
  {'source': 75, 'target': 99},
  {'source': 75, 'target': 97},
  {'source': 75, 'target': 68},
  {'source': 79, 'target': 99},
  {'source': 79, 'target': 98},
  {'source': 79, 'target': 67},
  {'source': 70, 'target': 54},
  {'source': 70, 'target': 53},
  {'source': 54, 'target': 35},
  {'source': 25, 'target': 38},
  {'source': 25, 'target': 17},
  {'source': 25, 'target': 30},
  {'source': 26, 'target': 38},
  {'source': 26, 'target': 39},
  {'source': 26, 'target': 34},
  {'source': 38, 'target': 50},
  {'source': 39, 'target': 50},
  {'source': 39, 'target': 51},
  {'source': 1, 'target': 3},
  {'source': 1, 'target': 5},
  {'source': 3, 'target': 11},
  {'source': 78, 'target': 100},
  {'source': 78, 'target': 99},
  {'source': 78, 'target': 67},
  {'source': 78, 'target': 68},
  {'source': 100, 'target': 101},
  {'source': 100, 'target': 76},
  {'source': 100, 'target': 77},
  {'source': 23, 'target': 34},
  {'source': 24, 'target': 28},
  {'source': 24, 'target': 30},
  {'source': 99, 'target': 101},
  {'source': 101, 'target': 98},
  {'source': 101, 'target': 97},
  {'source': 98, 'target': 76},
  {'source': 83, 'target': 90},
  {'source': 90, 'target': 92},
  {'source': 92, 'target': 89},
  {'source': 93, 'target': 96},
  {'source': 93, 'target': 105},
  {'source': 93, 'target': 91},
  {'source': 96, 'target': 102},
  {'source': 96, 'target': 103},
  {'source': 96, 'target': 94},
  {'source': 102, 'target': 104},
  {'source': 102, 'target': 106},
  {'source': 103, 'target': 104},
  {'source': 103, 'target': 105},
  {'source': 104, 'target': 109},
  {'source': 104, 'target': 110},
  {'source': 105, 'target': 110},
  {'source': 106, 'target': 109},
  {'source': 51, 'target': 34},
  {'source': 67, 'target': 76},
  {'source': 53, 'target': 57},
  {'source': 53, 'target': 35},
  {'source': 53, 'target': 68},
  {'source': 57, 'target': 77},
  {'source': 5, 'target': 10},
  {'source': 109, 'target': 111},
  {'source': 110, 'target': 111},
  {'source': 89, 'target': 94},
  {'source': 91, 'target': 94},
  {'source': 97, 'target': 77},
  {'source': 68, 'target': 77}],
 'multigraph': False,
 'nodes': [{'board_int': 162259895799233978881293873578304,
   'id': 32,
   'is_soln_state': True,
   'outer_nbrs': {6},
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 618972381798731150685897024,
   'id': 45,
   'is_soln_state': True,
   'outer_nbrs': {31},
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 2362165048212491075904,
   'id': 49,
   'is_soln_state': True,
   'outer_nbrs': {33},
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259895799239743488816907812864,
   'id': 44,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259897310397018007103292309504,
   'id': 46,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 618972387563338673720131584,
   'id': 47,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 2367929655735525310464,
   'id': 60,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 620483544837856960104628224,
   'id': 61,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259897310397018007043280207872,
   'id': 62,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162656038122968339673080779505664,
   'id': 63,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1513525204174021909807104,
   'id': 64,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162656038122968339673020767404032,
   'id': 65,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259897310397018007035778695168,
   'id': 81,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142323735342598538922033152,
   'id': 107,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142323735342598531420520448,
   'id': 108,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259897314380541949445031329792,
   'id': 18,
   'inner_nbrs': {8, 19},
   'is_soln_state': False,
   'outer_nbrs': {25, 26},
   'red_col': 1,
   'soln_distance': 7},
  {'board_int': 162259897314380541949505043431424,
   'id': 8,
   'inner_nbrs': {2, 10},
   'is_soln_state': False,
   'outer_nbrs': {17, 18},
   'red_col': 1,
   'soln_distance': 6},
  {'board_int': 396142327718866540940673155072,
   'id': 58,
   'inner_nbrs': {40, 54},
   'is_soln_state': False,
   'outer_nbrs': {73, 74},
   'red_col': 1,
   'soln_distance': 9},
  {'board_int': 396142327718857533741418545152,
   'id': 73,
   'inner_nbrs': {57, 58, 70},
   'is_soln_state': False,
   'outer_nbrs': {97},
   'red_col': 1,
   'soln_distance': 10},
  {'board_int': 162656038123465428985483911757824,
   'id': 43,
   'inner_nbrs': {30, 34},
   'is_soln_state': False,
   'outer_nbrs': {38, 48},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 620484041927169362299191296,
   'id': 37,
   'inner_nbrs': {23},
   'is_soln_state': False,
   'outer_nbrs': {42},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 396761296613248835339786387456,
   'id': 42,
   'inner_nbrs': {29, 37},
   'is_soln_state': False,
   'outer_nbrs': set(),
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 1511661110245024579190784,
   'id': 52,
   'inner_nbrs': {35, 36},
   'is_soln_state': False,
   'outer_nbrs': {56, 67, 68, 69},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 1514022293486424104370176,
   'id': 55,
   'inner_nbrs': {36},
   'is_soln_state': False,
   'outer_nbrs': {59, 67},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 396142324232431911002066386944,
   'id': 56,
   'inner_nbrs': {40, 41, 52},
   'is_soln_state': False,
   'outer_nbrs': {74, 76, 77},
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 396142326593615152401591566336,
   'id': 59,
   'inner_nbrs': {41, 55},
   'is_soln_state': False,
   'outer_nbrs': {76},
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 1515147544874955684446208,
   'id': 69,
   'inner_nbrs': {52, 54},
   'is_soln_state': False,
   'outer_nbrs': {74, 75, 79},
   'red_col': 1,
   'soln_distance': 9},
  {'board_int': 396142327718866540933171642368,
   'id': 74,
   'inner_nbrs': {56, 58, 69},
   'is_soln_state': False,
   'outer_nbrs': {97, 98},
   'red_col': 1,
   'soln_distance': 10},
  {'board_int': 162656038123465428985482974068736,
   'id': 48,
   'inner_nbrs': {43, 51},
   'is_soln_state': False,
   'outer_nbrs': {50},
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 396142324232431911009567899648,
   'id': 40,
   'inner_nbrs': {28, 35},
   'is_soln_state': False,
   'outer_nbrs': {56, 57, 58},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 162259897310894107319513926074368,
   'id': 19,
   'inner_nbrs': {10},
   'is_soln_state': False,
   'outer_nbrs': {18, 30, 34},
   'red_col': 2,
   'soln_distance': 6},
  {'board_int': 162656038123465428985551425372160,
   'id': 20,
   'inner_nbrs': {10},
   'is_soln_state': False,
   'outer_nbrs': {17, 30},
   'red_col': 2,
   'soln_distance': 6},
  {'board_int': 162259895803217502823695624700224,
   'id': 0,
   'inner_nbrs': {1},
   'is_soln_state': False,
   'outer_nbrs': {2},
   'red_col': 1,
   'soln_distance': 4},
  {'board_int': 396761296116159522937591824384,
   'id': 66,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396761296116159522877579722752,
   'id': 71,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142326096525839999397003264,
   'id': 72,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 620483544837856900092526592,
   'id': 80,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1513525204173961897705472,
   'id': 82,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142326096525839939384901632,
   'id': 84,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396761296116159522870078210048,
   'id': 85,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142326096525839931883388928,
   'id': 86,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 620483544837856892591013888,
   'id': 87,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396761296116159522869140520960,
   'id': 88,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396761296613248835340724076544,
   'id': 29,
   'inner_nbrs': {23, 24},
   'is_soln_state': False,
   'outer_nbrs': {42},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 1514022293486425042059264,
   'id': 36,
   'inner_nbrs': {22},
   'is_soln_state': False,
   'outer_nbrs': {41, 52, 55},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 396142326593615152402529255424,
   'id': 41,
   'inner_nbrs': {28, 36},
   'is_soln_state': False,
   'outer_nbrs': {56, 59},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 618972884652651144365998080,
   'id': 9,
   'inner_nbrs': {3},
   'is_soln_state': False,
   'outer_nbrs': {13},
   'red_col': 2,
   'soln_distance': 4},
  {'board_int': 2865018968206171176960,
   'id': 12,
   'inner_nbrs': {11},
   'is_soln_state': False,
   'outer_nbrs': {14},
   'red_col': 2,
   'soln_distance': 4},
  {'board_int': 620484041927169430750494720,
   'id': 13,
   'inner_nbrs': {9},
   'is_soln_state': False,
   'outer_nbrs': {15, 16},
   'red_col': 2,
   'soln_distance': 5},
  {'board_int': 396761296613248835408237690880,
   'id': 16,
   'inner_nbrs': {13},
   'is_soln_state': False,
   'outer_nbrs': {24},
   'red_col': 2,
   'soln_distance': 6},
  {'board_int': 620484041927169370738393088,
   'id': 15,
   'inner_nbrs': {13},
   'is_soln_state': False,
   'outer_nbrs': {23, 24},
   'red_col': 2,
   'soln_distance': 6},
  {'board_int': 396142326593615152470042869760,
   'id': 21,
   'inner_nbrs': {14},
   'is_soln_state': False,
   'outer_nbrs': {28},
   'red_col': 2,
   'soln_distance': 6},
  {'board_int': 1514022293486432543571968,
   'id': 22,
   'inner_nbrs': {14},
   'is_soln_state': False,
   'outer_nbrs': {28, 35, 36},
   'red_col': 2,
   'soln_distance': 6},
  {'board_int': 1513525204173954396192768,
   'id': 95,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259895799240788323930457768256,
   'id': 6,
   'inner_nbrs': {32},
   'is_soln_state': False,
   'outer_nbrs': {4},
   'red_col': 4,
   'soln_distance': 1},
  {'board_int': 618972443083714879943606592,
   'id': 7,
   'inner_nbrs': {31},
   'is_soln_state': False,
   'outer_nbrs': {3},
   'red_col': 3,
   'soln_distance': 2},
  {'board_int': 162259895799295263865023131287872,
   'id': 4,
   'inner_nbrs': {6},
   'is_soln_state': False,
   'outer_nbrs': {1},
   'red_col': 3,
   'soln_distance': 2},
  {'board_int': 2423450031941748785472,
   'id': 27,
   'inner_nbrs': {33},
   'is_soln_state': False,
   'outer_nbrs': {11},
   'red_col': 3,
   'soln_distance': 2},
  {'board_int': 618972388608173787270086976,
   'id': 31,
   'inner_nbrs': {45},
   'is_soln_state': False,
   'outer_nbrs': {7},
   'red_col': 4,
   'soln_distance': 1},
  {'board_int': 2368974490849075265856,
   'id': 33,
   'inner_nbrs': {49},
   'is_soln_state': False,
   'outer_nbrs': {27},
   'red_col': 4,
   'soln_distance': 1},
  {'board_int': 162259895803223267431218658934784,
   'id': 2,
   'inner_nbrs': {0, 5},
   'is_soln_state': False,
   'outer_nbrs': {8},
   'red_col': 1,
   'soln_distance': 5},
  {'board_int': 1515147535867756429836288,
   'id': 75,
   'inner_nbrs': {68, 69, 70},
   'is_soln_state': False,
   'outer_nbrs': {97, 99},
   'red_col': 1,
   'soln_distance': 10},
  {'board_int': 1515147544874954746757120,
   'id': 79,
   'inner_nbrs': {67, 69},
   'is_soln_state': False,
   'outer_nbrs': {98, 99},
   'red_col': 1,
   'soln_distance': 10},
  {'board_int': 1515147535867763931348992,
   'id': 70,
   'inner_nbrs': {53, 54},
   'is_soln_state': False,
   'outer_nbrs': {73, 75},
   'red_col': 1,
   'soln_distance': 9},
  {'board_int': 1515147544874963185958912,
   'id': 54,
   'inner_nbrs': {35},
   'is_soln_state': False,
   'outer_nbrs': {58, 69, 70},
   'red_col': 1,
   'soln_distance': 8},
  {'board_int': 162656038126951863615422518525952,
   'id': 25,
   'inner_nbrs': {17, 18, 30},
   'is_soln_state': False,
   'outer_nbrs': {38},
   'red_col': 1,
   'soln_distance': 8},
  {'board_int': 162259897314380541949437529817088,
   'id': 26,
   'inner_nbrs': {18, 34},
   'is_soln_state': False,
   'outer_nbrs': {38, 39},
   'red_col': 1,
   'soln_distance': 8},
  {'board_int': 162656038126951863615415017013248,
   'id': 38,
   'inner_nbrs': {25, 26, 43},
   'is_soln_state': False,
   'outer_nbrs': {50},
   'red_col': 1,
   'soln_distance': 9},
  {'board_int': 162259897314380541949436592128000,
   'id': 39,
   'inner_nbrs': {26, 51},
   'is_soln_state': False,
   'outer_nbrs': {50},
   'red_col': 1,
   'soln_distance': 9},
  {'board_int': 162656038126951863615414079324160,
   'id': 50,
   'inner_nbrs': {38, 39, 48},
   'is_soln_state': False,
   'outer_nbrs': set(),
   'red_col': 1,
   'soln_distance': 10},
  {'board_int': 162656038126951863615482530627584,
   'id': 17,
   'inner_nbrs': {8, 20},
   'is_soln_state': False,
   'outer_nbrs': {25},
   'red_col': 1,
   'soln_distance': 7},
  {'board_int': 162259895799731068193764519444800,
   'id': 1,
   'inner_nbrs': {4},
   'is_soln_state': False,
   'outer_nbrs': {0, 5},
   'red_col': 2,
   'soln_distance': 3},
  {'board_int': 618972878888043621331763520,
   'id': 3,
   'inner_nbrs': {7},
   'is_soln_state': False,
   'outer_nbrs': {9},
   'red_col': 2,
   'soln_distance': 3},
  {'board_int': 2859254360683136942400,
   'id': 11,
   'inner_nbrs': {27},
   'is_soln_state': False,
   'outer_nbrs': {12},
   'red_col': 2,
   'soln_distance': 3},
  {'board_int': 1511661101237824386891776,
   'id': 78,
   'inner_nbrs': {67, 68},
   'is_soln_state': False,
   'outer_nbrs': {99, 100},
   'red_col': 2,
   'soln_distance': 10},
  {'board_int': 396142324232422903801874087936,
   'id': 100,
   'inner_nbrs': {76, 77, 78},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 2,
   'soln_distance': 11},
  {'board_int': 620484041927169363236880384,
   'id': 23,
   'inner_nbrs': {15},
   'is_soln_state': False,
   'outer_nbrs': {29, 37},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 396761296613248835348225589248,
   'id': 24,
   'inner_nbrs': {15, 16},
   'is_soln_state': False,
   'outer_nbrs': {29},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 396142326593615152410030768128,
   'id': 28,
   'inner_nbrs': {21, 22},
   'is_soln_state': False,
   'outer_nbrs': {40, 41},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 1514022293486492555673600,
   'id': 14,
   'inner_nbrs': {12},
   'is_soln_state': False,
   'outer_nbrs': {21, 22},
   'red_col': 2,
   'soln_distance': 5},
  {'board_int': 1515147535867755492147200,
   'id': 99,
   'inner_nbrs': {75, 78, 79},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 1,
   'soln_distance': 11},
  {'board_int': 396142327718857533732979343360,
   'id': 101,
   'inner_nbrs': {97, 98, 99, 100},
   'is_soln_state': False,
   'red_col': 1,
   'soln_distance': 12},
  {'board_int': 396142327718866540932233953280,
   'id': 98,
   'inner_nbrs': {74, 76, 79},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 1,
   'soln_distance': 11},
  {'board_int': 162656038122968339673013265891328,
   'id': 83,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162656038122968339673012328202240,
   'id': 90,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259897310397018007034841006080,
   'id': 92,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142323735342598530482831360,
   'id': 93,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1511164020932552995635200,
   'id': 96,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1511164020932553933324288,
   'id': 102,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1511164011925353741025280,
   'id': 103,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1511164011925354678714368,
   'id': 104,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142323735333591331228221440,
   'id': 105,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1511164020932561434836992,
   'id': 106,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 162259897310894107319505486872576,
   'id': 51,
   'inner_nbrs': {34},
   'is_soln_state': False,
   'outer_nbrs': {39, 48},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 1511661110245023641501696,
   'id': 67,
   'inner_nbrs': {52, 55},
   'is_soln_state': False,
   'outer_nbrs': {76, 78, 79},
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 396142324232431911001128697856,
   'id': 76,
   'inner_nbrs': {56, 59, 67},
   'is_soln_state': False,
   'outer_nbrs': {98, 100},
   'red_col': 2,
   'soln_distance': 10},
  {'board_int': 1511661101237832826093568,
   'id': 53,
   'inner_nbrs': {35},
   'is_soln_state': False,
   'outer_nbrs': {57, 68, 70},
   'red_col': 2,
   'soln_distance': 8},
  {'board_int': 396142324232422903810313289728,
   'id': 57,
   'inner_nbrs': {40, 53},
   'is_soln_state': False,
   'outer_nbrs': {73, 77},
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 162259895799736832801287553679360,
   'id': 5,
   'inner_nbrs': {1},
   'is_soln_state': False,
   'outer_nbrs': {2, 10},
   'red_col': 2,
   'soln_distance': 4},
  {'board_int': 162259897310894107319573938176000,
   'id': 10,
   'inner_nbrs': {5},
   'is_soln_state': False,
   'outer_nbrs': {8, 19, 20},
   'red_col': 2,
   'soln_distance': 5},
  {'board_int': 162656038123465428985491413270528,
   'id': 30,
   'inner_nbrs': {19, 20},
   'is_soln_state': False,
   'outer_nbrs': {25, 43},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 162259897310894107319506424561664,
   'id': 34,
   'inner_nbrs': {19},
   'is_soln_state': False,
   'outer_nbrs': {26, 43, 51},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 1511661110245032080703488,
   'id': 35,
   'inner_nbrs': {22},
   'is_soln_state': False,
   'outer_nbrs': {40, 52, 53, 54},
   'red_col': 2,
   'soln_distance': 7},
  {'board_int': 1511164011925362180227072,
   'id': 109,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142323735333591332165910528,
   'id': 110,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142323735333591339667423232,
   'id': 111,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 620483544837856891653324800,
   'id': 89,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142326096525839930945699840,
   'id': 91,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 1513525204173953458503680,
   'id': 94,
   'is_soln_state': True,
   'outer_nbrs': set(),
   'red_col': 5,
   'soln_distance': 0},
  {'board_int': 396142327718857533733917032448,
   'id': 97,
   'inner_nbrs': {73, 74, 75, 77},
   'is_soln_state': False,
   'outer_nbrs': {101},
   'red_col': 1,
   'soln_distance': 11},
  {'board_int': 1511661101237825324580864,
   'id': 68,
   'inner_nbrs': {52, 53},
   'is_soln_state': False,
   'outer_nbrs': {75, 77, 78},
   'red_col': 2,
   'soln_distance': 9},
  {'board_int': 396142324232422903802811777024,
   'id': 77,
   'inner_nbrs': {56, 57, 68},
   'is_soln_state': False,
   'outer_nbrs': {97, 100},
   'red_col': 2,
   'soln_distance': 10}]}

In [34]:
json = nx.readwrite.json_graph.node_link_data(g2)

In [35]:
json


Out[35]:
{'directed': False,
 'graph': {'dist_partition': {0: {(2362165048212491075904, 5),
    (2367929655735525310464, 5),
    (1511164011925353741025280, 5),
    (1511164011925354678714368, 5),
    (1511164011925362180227072, 5),
    (1511164020932552995635200, 5),
    (1511164020932553933324288, 5),
    (1511164020932561434836992, 5),
    (1513525204173953458503680, 5),
    (1513525204173954396192768, 5),
    (1513525204173961897705472, 5),
    (1513525204174021909807104, 5),
    (618972381798731150685897024, 5),
    (618972387563338673720131584, 5),
    (620483544837856891653324800, 5),
    (620483544837856892591013888, 5),
    (620483544837856900092526592, 5),
    (620483544837856960104628224, 5),
    (396142323735333591331228221440, 5),
    (396142323735333591332165910528, 5),
    (396142323735333591339667423232, 5),
    (396142323735342598530482831360, 5),
    (396142323735342598531420520448, 5),
    (396142323735342598538922033152, 5),
    (396142326096525839930945699840, 5),
    (396142326096525839931883388928, 5),
    (396142326096525839939384901632, 5),
    (396142326096525839999397003264, 5),
    (396761296116159522869140520960, 5),
    (396761296116159522870078210048, 5),
    (396761296116159522877579722752, 5),
    (396761296116159522937591824384, 5),
    (162259895799233978881293873578304, 5),
    (162259895799239743488816907812864, 5),
    (162259897310397018007034841006080, 5),
    (162259897310397018007035778695168, 5),
    (162259897310397018007043280207872, 5),
    (162259897310397018007103292309504, 5),
    (162656038122968339673012328202240, 5),
    (162656038122968339673013265891328, 5),
    (162656038122968339673020767404032, 5),
    (162656038122968339673080779505664, 5)},
   1: {(2368974490849075265856, 4),
    (618972388608173787270086976, 4),
    (162259895799240788323930457768256, 4)},
   2: {(2423450031941748785472, 3),
    (618972443083714879943606592, 3),
    (162259895799295263865023131287872, 3)},
   3: {(2859254360683136942400, 2),
    (618972878888043621331763520, 2),
    (162259895799731068193764519444800, 2)},
   4: {(2865018968206171176960, 2),
    (618972884652651144365998080, 2),
    (162259895799736832801287553679360, 2),
    (162259895803217502823695624700224, 1)},
   5: {(1514022293486492555673600, 2),
    (620484041927169430750494720, 2),
    (162259895803223267431218658934784, 1),
    (162259897310894107319573938176000, 2)},
   6: {(1514022293486432543571968, 2),
    (620484041927169370738393088, 2),
    (396142326593615152470042869760, 2),
    (396761296613248835408237690880, 2),
    (162259897310894107319513926074368, 2),
    (162259897314380541949505043431424, 1),
    (162656038123465428985551425372160, 2)},
   7: {(1511661110245032080703488, 2),
    (1514022293486425042059264, 2),
    (620484041927169363236880384, 2),
    (396142326593615152410030768128, 2),
    (396761296613248835348225589248, 2),
    (162259897310894107319506424561664, 2),
    (162259897314380541949445031329792, 1),
    (162656038123465428985491413270528, 2),
    (162656038126951863615482530627584, 1)},
   8: {(1511661101237832826093568, 2),
    (1511661110245024579190784, 2),
    (1514022293486424104370176, 2),
    (1515147544874963185958912, 1),
    (620484041927169362299191296, 2),
    (396142324232431911009567899648, 2),
    (396142326593615152402529255424, 2),
    (396761296613248835340724076544, 2),
    (162259897310894107319505486872576, 2),
    (162259897314380541949437529817088, 1),
    (162656038123465428985483911757824, 2),
    (162656038126951863615422518525952, 1)},
   9: {(1511661101237825324580864, 2),
    (1511661110245023641501696, 2),
    (1515147535867763931348992, 1),
    (1515147544874955684446208, 1),
    (396142324232422903810313289728, 2),
    (396142324232431911002066386944, 2),
    (396142326593615152401591566336, 2),
    (396142327718866540940673155072, 1),
    (396761296613248835339786387456, 2),
    (162259897314380541949436592128000, 1),
    (162656038123465428985482974068736, 2),
    (162656038126951863615415017013248, 1)},
   10: {(1511661101237824386891776, 2),
    (1515147535867756429836288, 1),
    (1515147544874954746757120, 1),
    (396142324232422903802811777024, 2),
    (396142324232431911001128697856, 2),
    (396142327718857533741418545152, 1),
    (396142327718866540933171642368, 1),
    (162656038126951863615414079324160, 1)},
   11: {(1515147535867755492147200, 1),
    (396142324232422903801874087936, 2),
    (396142327718857533733917032448, 1),
    (396142327718866540932233953280, 1)},
   12: {(396142327718857533732979343360, 1)}}},
 'links': [{'source': 0, 'target': 1},
  {'source': 0, 'target': 2},
  {'source': 1, 'target': 3},
  {'source': 1, 'target': 4},
  {'source': 1, 'target': 5},
  {'source': 2, 'target': 8},
  {'source': 2, 'target': 5},
  {'source': 3, 'target': 11},
  {'source': 3, 'target': 7},
  {'source': 3, 'target': 9},
  {'source': 4, 'target': 6},
  {'source': 4, 'target': 7},
  {'source': 5, 'target': 9},
  {'source': 5, 'target': 10},
  {'source': 6, 'target': 31},
  {'source': 6, 'target': 32},
  {'source': 7, 'target': 27},
  {'source': 7, 'target': 31},
  {'source': 8, 'target': 17},
  {'source': 8, 'target': 18},
  {'source': 8, 'target': 10},
  {'source': 9, 'target': 12},
  {'source': 9, 'target': 13},
  {'source': 10, 'target': 13},
  {'source': 10, 'target': 19},
  {'source': 10, 'target': 20},
  {'source': 11, 'target': 12},
  {'source': 11, 'target': 27},
  {'source': 12, 'target': 14},
  {'source': 13, 'target': 14},
  {'source': 13, 'target': 15},
  {'source': 13, 'target': 16},
  {'source': 14, 'target': 21},
  {'source': 14, 'target': 22},
  {'source': 15, 'target': 22},
  {'source': 15, 'target': 23},
  {'source': 15, 'target': 19},
  {'source': 15, 'target': 24},
  {'source': 16, 'target': 21},
  {'source': 16, 'target': 20},
  {'source': 16, 'target': 24},
  {'source': 17, 'target': 25},
  {'source': 17, 'target': 20},
  {'source': 18, 'target': 25},
  {'source': 18, 'target': 26},
  {'source': 18, 'target': 19},
  {'source': 19, 'target': 34},
  {'source': 19, 'target': 30},
  {'source': 20, 'target': 30},
  {'source': 21, 'target': 28},
  {'source': 22, 'target': 35},
  {'source': 22, 'target': 36},
  {'source': 22, 'target': 28},
  {'source': 23, 'target': 37},
  {'source': 23, 'target': 36},
  {'source': 23, 'target': 34},
  {'source': 23, 'target': 29},
  {'source': 24, 'target': 28},
  {'source': 24, 'target': 29},
  {'source': 24, 'target': 30},
  {'source': 25, 'target': 38},
  {'source': 25, 'target': 30},
  {'source': 26, 'target': 38},
  {'source': 26, 'target': 39},
  {'source': 26, 'target': 34},
  {'source': 27, 'target': 33},
  {'source': 28, 'target': 40},
  {'source': 28, 'target': 41},
  {'source': 29, 'target': 42},
  {'source': 29, 'target': 41},
  {'source': 29, 'target': 43},
  {'source': 30, 'target': 43},
  {'source': 31, 'target': 33},
  {'source': 31, 'target': 45},
  {'source': 32, 'target': 44},
  {'source': 32, 'target': 45},
  {'source': 33, 'target': 49},
  {'source': 34, 'target': 43},
  {'source': 34, 'target': 51},
  {'source': 35, 'target': 52},
  {'source': 35, 'target': 53},
  {'source': 35, 'target': 54},
  {'source': 35, 'target': 40},
  {'source': 36, 'target': 41},
  {'source': 36, 'target': 52},
  {'source': 36, 'target': 55},
  {'source': 37, 'target': 55},
  {'source': 37, 'target': 51},
  {'source': 37, 'target': 42},
  {'source': 38, 'target': 43},
  {'source': 38, 'target': 50},
  {'source': 39, 'target': 50},
  {'source': 39, 'target': 51},
  {'source': 40, 'target': 56},
  {'source': 40, 'target': 57},
  {'source': 40, 'target': 58},
  {'source': 41, 'target': 59},
  {'source': 41, 'target': 56},
  {'source': 42, 'target': 59},
  {'source': 42, 'target': 48},
  {'source': 43, 'target': 48},
  {'source': 44, 'target': 46},
  {'source': 44, 'target': 47},
  {'source': 45, 'target': 47},
  {'source': 45, 'target': 49},
  {'source': 46, 'target': 62},
  {'source': 46, 'target': 63},
  {'source': 46, 'target': 61},
  {'source': 47, 'target': 61},
  {'source': 47, 'target': 60},
  {'source': 48, 'target': 51},
  {'source': 48, 'target': 50},
  {'source': 49, 'target': 60},
  {'source': 52, 'target': 67},
  {'source': 52, 'target': 56},
  {'source': 52, 'target': 68},
  {'source': 52, 'target': 69},
  {'source': 53, 'target': 57},
  {'source': 53, 'target': 70},
  {'source': 53, 'target': 68},
  {'source': 54, 'target': 70},
  {'source': 54, 'target': 58},
  {'source': 54, 'target': 69},
  {'source': 55, 'target': 67},
  {'source': 55, 'target': 59},
  {'source': 56, 'target': 76},
  {'source': 56, 'target': 77},
  {'source': 56, 'target': 74},
  {'source': 57, 'target': 73},
  {'source': 57, 'target': 77},
  {'source': 58, 'target': 73},
  {'source': 58, 'target': 74},
  {'source': 59, 'target': 76},
  {'source': 60, 'target': 64},
  {'source': 61, 'target': 66},
  {'source': 61, 'target': 64},
  {'source': 61, 'target': 80},
  {'source': 62, 'target': 81},
  {'source': 62, 'target': 65},
  {'source': 62, 'target': 80},
  {'source': 63, 'target': 65},
  {'source': 63, 'target': 66},
  {'source': 64, 'target': 82},
  {'source': 64, 'target': 72},
  {'source': 65, 'target': 83},
  {'source': 65, 'target': 71},
  {'source': 66, 'target': 71},
  {'source': 66, 'target': 72},
  {'source': 67, 'target': 78},
  {'source': 67, 'target': 79},
  {'source': 67, 'target': 76},
  {'source': 68, 'target': 78},
  {'source': 68, 'target': 77},
  {'source': 68, 'target': 75},
  {'source': 69, 'target': 75},
  {'source': 69, 'target': 79},
  {'source': 69, 'target': 74},
  {'source': 70, 'target': 73},
  {'source': 70, 'target': 75},
  {'source': 71, 'target': 84},
  {'source': 71, 'target': 80},
  {'source': 71, 'target': 85},
  {'source': 72, 'target': 84},
  {'source': 73, 'target': 97},
  {'source': 74, 'target': 97},
  {'source': 74, 'target': 98},
  {'source': 75, 'target': 97},
  {'source': 75, 'target': 99},
  {'source': 76, 'target': 100},
  {'source': 76, 'target': 98},
  {'source': 77, 'target': 100},
  {'source': 77, 'target': 97},
  {'source': 78, 'target': 100},
  {'source': 78, 'target': 99},
  {'source': 79, 'target': 99},
  {'source': 79, 'target': 98},
  {'source': 80, 'target': 82},
  {'source': 80, 'target': 87},
  {'source': 81, 'target': 92},
  {'source': 81, 'target': 83},
  {'source': 81, 'target': 87},
  {'source': 82, 'target': 95},
  {'source': 82, 'target': 106},
  {'source': 82, 'target': 84},
  {'source': 83, 'target': 85},
  {'source': 83, 'target': 90},
  {'source': 84, 'target': 107},
  {'source': 84, 'target': 86},
  {'source': 85, 'target': 86},
  {'source': 85, 'target': 87},
  {'source': 85, 'target': 88},
  {'source': 86, 'target': 91},
  {'source': 86, 'target': 108},
  {'source': 86, 'target': 95},
  {'source': 87, 'target': 95},
  {'source': 87, 'target': 89},
  {'source': 88, 'target': 89},
  {'source': 88, 'target': 90},
  {'source': 88, 'target': 91},
  {'source': 89, 'target': 94},
  {'source': 89, 'target': 92},
  {'source': 90, 'target': 92},
  {'source': 91, 'target': 93},
  {'source': 91, 'target': 94},
  {'source': 93, 'target': 96},
  {'source': 93, 'target': 108},
  {'source': 93, 'target': 105},
  {'source': 94, 'target': 95},
  {'source': 94, 'target': 96},
  {'source': 95, 'target': 102},
  {'source': 96, 'target': 102},
  {'source': 96, 'target': 103},
  {'source': 97, 'target': 101},
  {'source': 98, 'target': 101},
  {'source': 99, 'target': 101},
  {'source': 100, 'target': 101},
  {'source': 102, 'target': 106},
  {'source': 102, 'target': 108},
  {'source': 102, 'target': 104},
  {'source': 103, 'target': 104},
  {'source': 103, 'target': 105},
  {'source': 104, 'target': 109},
  {'source': 104, 'target': 110},
  {'source': 105, 'target': 110},
  {'source': 106, 'target': 107},
  {'source': 106, 'target': 109},
  {'source': 107, 'target': 108},
  {'source': 107, 'target': 111},
  {'source': 108, 'target': 110},
  {'source': 109, 'target': 111},
  {'source': 110, 'target': 111}],
 'multigraph': False,
 'nodes': [{'id': 0},
  {'id': 1},
  {'id': 2},
  {'id': 3},
  {'id': 4},
  {'id': 5},
  {'id': 6},
  {'id': 7},
  {'id': 8},
  {'id': 9},
  {'id': 10},
  {'id': 11},
  {'id': 12},
  {'id': 13},
  {'id': 14},
  {'id': 15},
  {'id': 16},
  {'id': 17},
  {'id': 18},
  {'id': 19},
  {'id': 20},
  {'id': 21},
  {'id': 22},
  {'id': 23},
  {'id': 24},
  {'id': 25},
  {'id': 26},
  {'id': 27},
  {'id': 28},
  {'id': 29},
  {'id': 30},
  {'id': 31},
  {'id': 32},
  {'id': 33},
  {'id': 34},
  {'id': 35},
  {'id': 36},
  {'id': 37},
  {'id': 38},
  {'id': 39},
  {'id': 40},
  {'id': 41},
  {'id': 42},
  {'id': 43},
  {'id': 44},
  {'id': 45},
  {'id': 46},
  {'id': 47},
  {'id': 48},
  {'id': 49},
  {'id': 50},
  {'id': 51},
  {'id': 52},
  {'id': 53},
  {'id': 54},
  {'id': 55},
  {'id': 56},
  {'id': 57},
  {'id': 58},
  {'id': 59},
  {'id': 60},
  {'id': 61},
  {'id': 62},
  {'id': 63},
  {'id': 64},
  {'id': 65},
  {'id': 66},
  {'id': 67},
  {'id': 68},
  {'id': 69},
  {'id': 70},
  {'id': 71},
  {'id': 72},
  {'id': 73},
  {'id': 74},
  {'id': 75},
  {'id': 76},
  {'id': 77},
  {'id': 78},
  {'id': 79},
  {'id': 80},
  {'id': 81},
  {'id': 82},
  {'id': 83},
  {'id': 84},
  {'id': 85},
  {'id': 86},
  {'id': 87},
  {'id': 88},
  {'id': 89},
  {'id': 90},
  {'id': 91},
  {'id': 92},
  {'id': 93},
  {'id': 94},
  {'id': 95},
  {'id': 96},
  {'id': 97},
  {'id': 98},
  {'id': 99},
  {'id': 100},
  {'id': 101},
  {'id': 102},
  {'id': 103},
  {'id': 104},
  {'id': 105},
  {'id': 106},
  {'id': 107},
  {'id': 108},
  {'id': 109},
  {'id': 110},
  {'id': 111}]}

In [ ]:
partition = {}


partition[0] = set([x for x in g.nodes() if 5 in x[1] ])

remaining_nodes = set(g.nodes())
remaining_nodes.difference_update(partition[0])
i = 1

In [ ]:
partition[i] = set()
tmp = set(partition[0])

In [ ]:
x = tmp.pop()
x

In [ ]:
nbrs = set(g.neighbors(x) )
remaining_nodes.difference_update(nbrs)

In [ ]:
nbrs

In [ ]:
nbrs.difference_update(partition[i-1])
nbrs

In [ ]:
partition[i].update(nbrs)

In [ ]:
partition[1]

In [ ]:
x = np.zeros((6,6),dtype=int)
x[2,1:3] = hcar

x[0:3,0] = vtruck
x[0,1:3] = hcar
x[0:3,3] = vtruck
x[3:5,2] = vcar
x[3,3:6] = htruck
x[5,2:5] = htruck
x[4:6,5] = vcar


x

In [ ]:
HTML(svg_from_state(x,(int(1),int(2))).tostring())

In [ ]:
comps = components(  [(board_to_int(x),(int(1),int(2)))] )
comps

In [ ]:
g = comps[0]
len(g.nodes()), g.size()

In [ ]:
g.graph['dist_partition'] = distance_partition(g)

In [ ]:
g.graph['dist_partition'].keys()

In [ ]:
data = np.array([len(g.graph['dist_partition'][i]) for i in range(len(g.graph['dist_partition'].keys()))])
data

In [ ]:
H = nx.blockmodel(g,list(g.graph['dist_partition'].values()))

In [ ]:
len(H.nodes())

In [ ]:
nx.draw_networkx(H)
plt.show()

In [ ]:
%run numpy_generate_states.py

In [ ]:
states = generate_states(2,2)
len(states)

In [ ]:
comps = components(  states )
len(comps)

In [ ]:
sizes_2_2 = np.array([ [i,len(comps[i].nodes())] for i in range(len(comps)) ])

In [ ]:
np.histogram(sizes_2_2)

In [ ]:
np.sum(sizes_2_2)

In [ ]:
comp_states = set()
gen_states = set(states)
for g in comps:
    comp_states.update(set(g.nodes()))
    
gen_states.difference_update(comp_states)

len(gen_states)

In [ ]:
gen_states

In [ ]:
s = set(comp_states.pop())

In [ ]:
t = set(gen_states.pop())

In [ ]:
t,s

In [ ]:
t.difference_update(s)
t

In [ ]:
plt.hist(sizes_2_2, bins='auto') 
plt.show()

In [ ]:
len(np.unique(sizes_2_2))

In [ ]:
plt.scatter(sizes_2_2[:,0],sizes_2_2[:,1])
plt.show()

In [ ]:
#[ [f1(comps[i]),f2(comps[i]),f3(comps[i])] for i in range(len(comps))]

In [ ]:
#nodes, #issolvable,

In [ ]:
np.array([x[1][1] for x in g.nodes()])

In [ ]:
solvable = [g for g in comps if g.graph['solvable']]
unsolvable = [g for g in comps if not g.graph['solvable']]

In [ ]:
len(solvable),len(unsolvable)

In [ ]:
g = unsolvable[0]
len(g.nodes())

In [ ]:
g.nodes()

In [ ]:
HTML(svg_from_state(int_to_board(63230561102196900165),(int(1),int(2))).tostring())

In [ ]:
[x for x in range(1,6)]

In [26]:
keys = ['a','b','c']
new_keys = range(len(keys))

keys,list(new_keys)


Out[26]:
(['a', 'b', 'c'], [0, 1, 2])

In [28]:
list(zip(keys,new_keys))


Out[28]:
[('a', 0), ('b', 1), ('c', 2)]

In [29]:
{x[0]:x[1] for x in zip(keys,new_keys)}


Out[29]:
{'a': 0, 'b': 1, 'c': 2}

In [30]:



---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-30-f5302386464f> in <module>()
----> 1 g

NameError: name 'g' is not defined

In [31]:



Out[31]:
[(278879418257689031394712044437504, 1),
 (278874464056068328158013325049856, 1),
 (278873382974154137775873844051968, 1),
 (278873247838914863978106408927232, 1),
 (278873240623184995189394656722944, 1),
 (278873230947009954753385479536640, 1),
 (278873230045043721154796510511104, 1),
 (278873228722776061900471742234624, 1),
 (278873228557492604493681146200064, 1),
 (278873228533954324868103537688576, 1),
 (278873228533926799043103580749824, 1),
 (278873228533889887364635120631808, 1),
 (278873228533886446636510126014464, 1),
 (278873228533881402585685944172544, 1),
 (278873228533880772079332921442304, 1),
 (278873228533880699986210912731136, 1),
 (278873228533880693266038793601024, 1),
 (278873228533880684254398542512128, 1),
 (278873228533880683414377027620864, 1),
 (278873228533880682287921996234752, 1),
 (278873228533880682182919306873344, 1),
 (278873228533880682042112427950080, 1),
 (278873228533880682028987091779904, 1),
 (278873228533880682009745564893224, 1),
 (278873228533880682007340374032389, 1),
 (278873228533880682007065360596992, 1),
 (278873228533880682007005348495360, 1),
 (278873228533880682006997846982656, 1),
 (278873228533880682006996909293568, 1),
 (278873228533880682006996775599616, 1),
 (278873228533880682006996775370688, 1),
 (278873228533880682006996775342072, 1),
 (278873228533880682006996775338495, 1),
 (277614255603231763273900386942976, 1),
 (277377810566891294767204156833792, 1),
 (277031186033623729055149087260672, 1),
 (276987857966965283341142203564032, 1),
 (276981670656286206699815638663168, 1),
 (276981669754319973101226669637632, 1),
 (276981668432052313846901901361152, 1),
 (276981668266768856440111305326592, 1),
 (276981668243166139311065279758336, 1),
 (276981668243162698582940285140992, 1),
 (276981668243157654532116103299072, 1),
 (276981668243157024025763080568832, 1),
 (276981668243156951932641071857664, 1),
 (276981668243156945212468952727552, 1),
 (276981668243156936200828701638656, 1),
 (276981668243156935360807186747392, 1),
 (276981668243156934234352155361280, 1),
 (276981668243156934129349465999872, 1),
 (276981668243156933988542587076608, 1),
 (276981668243156933975417250906432, 1),
 (276981668243156933956175724019752, 1),
 (276981668243156933953770533158917, 1),
 (276981668243156933953495519723520, 1),
 (276981668243156933953435507621888, 1),
 (276981668243156933953428006109184, 1),
 (276981668243156933953427068420096, 1),
 (276981668243156933953426934726144, 1),
 (276981668243156933953426934497216, 1),
 (276981668243156933953426934468600, 1),
 (276981668243156933953426934465023, 1),
 (274446352535544522914699157700608, 1),
 (274445271453630332532559676702720, 1),
 (274445136318391058734792241577984, 1),
 (274445129102661189946080489373696, 1),
 (274445119426486149510071312187392, 1),
 (274445118524519915911482343161856, 1),
 (274445117202252256657157574885376, 1),
 (274445117036968799250366978850816, 1),
 (274445117013430519624789370339328, 1),
 (274445117013402993799789413400576, 1),
 (274445117013366082121320953282560, 1),
 (274445117013362641393195958665216, 1),
 (274445117013357597342371776823296, 1),
 (274445117013356966836018754093056, 1),
 (274445117013356894742896745381888, 1),
 (274445117013356888022724626251776, 1),
 (274445117013356879011084375162880, 1),
 (274445117013356878171062860271616, 1),
 (274445117013356877044607828885504, 1),
 (274445117013356876939605139524096, 1),
 (274445117013356876798798260600832, 1),
 (274445117013356876785672924430656, 1),
 (274445117013356876766431397543976, 1),
 (274445117013356876764026206683141, 1),
 (274445117013356876763751193247744, 1),
 (274445117013356876763691181146112, 1),
 (274445117013356876763683679633408, 1),
 (274445117013356876763682741944320, 1),
 (274445117013356876763682608250368, 1),
 (274445117013356876763682608021440, 1),
 (274445117013356876763682607992824, 1),
 (274445117013356876763682607989247, 1),
 (274258189767483203358708530675712, 1),
 (274214861700824757644701646979072, 1),
 (274209907499204054408002927591424, 1),
 (274208684066320721439384259264512, 1),
 (274208672165911788150461344776192, 1),
 (274208672000628330743670748741632, 1),
 (274208671977062525293093183291392, 1),
 (274208671977017128835675546714112, 1),
 (274208671977016498329322523983872, 1),
 (274208671977016426236200515272704, 1),
 (274208671977016419516028396142592, 1),
 (274208671977016410504388145053696, 1),
 (274208671977016409664366630162432, 1),
 (274208671977016408537911598776320, 1),
 (274208671977016408432908909414912, 1),
 (274208671977016408292102030491648, 1),
 (274208671977016408278976694321472, 1),
 (274208671977016408259735167434792, 1),
 (274208671977016408257329976573957, 1),
 (274208671977016408257054963138560, 1),
 (274208671977016408256994951036928, 1),
 (274208671977016408256987449524224, 1),
 (274208671977016408256986511835136, 1),
 (274208671977016408256986378141184, 1),
 (274208671977016408256986377912256, 1),
 (274208671977016408256986377883640, 1),
 (274208671977016408256986377880063, 1),
 (273868237167557191932646577405952, 1),
 (273863282965936488695947858018304, 1),
 (273862201884022298313808377020416, 1),
 (273862059533053155727329189691392, 1),
 (273862048954911881692731043479552, 1),
 (273862047467360765031615679168512, 1),
 (273862047443794959581038113718272, 1),
 (273862047443754607174444658982912, 1),
 (273862047443748932617267454410752, 1),
 (273862047443748860524145445699584, 1),
 (273862047443748853803973326569472, 1),
 (273862047443748844792333075480576, 1),
 (273862047443748843952311560589312, 1),
 (273862047443748842825856529203200, 1),
 (273862047443748842720853839841792, 1),
 (273862047443748842580046960918528, 1),
 (273862047443748842566921624748352, 1),
 (273862047443748842547680097861672, 1),
 (273862047443748842545274907000837, 1),
 (273862047443748842544999893565440, 1),
 (273862047443748842544939881463808, 1),
 (273862047443748842544932379951104, 1),
 (273862047443748842544931442262016, 1),
 (273862047443748842544931308568064, 1),
 (273862047443748842544931308339136, 1),
 (273862047443748842544931308310520, 1),
 (273862047443748842544931308306943, 1),
 (273819954899278042981940974321664, 1),
 (273818873817363852599801493323776, 1),
 (273818738682124578802034058199040, 1),
 (273818731466394710013322305994752, 1),
 (273818720888253435978724159782912, 1),
 (273818719565985776724399391506432, 1),
 (273818719377164039692031186960384, 1),
 (273818719377136513867031230021632, 1),
 (273818719377096161460437775286272, 1),
 (273818719377091117409613593444352, 1),
 (273818719377090414810138562002944, 1),
 (273818719377090408089966442872832, 1),
 (273818719377090399078326191783936, 1),
 (273818719377090398238304676892672, 1),
 (273818719377090397111849645506560, 1),
 (273818719377090397006846956145152, 1),
 (273818719377090396866040077221888, 1),
 (273818719377090396852914741051712, 1),
 (273818719377090396833673214165032, 1),
 (273818719377090396831268023304197, 1),
 (273818719377090396830993009868800, 1),
 (273818719377090396830932997767168, 1),
 (273818719377090396830925496254464, 1),
 (273818719377090396830924558565376, 1),
 (273818719377090396830924424871424, 1),
 (273818719377090396830924424642496, 1),
 (273818719377090396830924424613880, 1),
 (273818719377090396830924424610303, 1),
 (273813767588598966340614409420800, 1),
 (273813766686632732742025440395264, 1),
 (273813765364365073487700672118784, 1),
 (273813765199081616080910076084224, 1),
 (273813765175543336455332467572736, 1),
 (273813765175515810630332510633984, 1),
 (273813765175478898951864050515968, 1),
 (273813765175475458223739055898624, 1),
 (273813765175470414172914874056704, 1),
 (273813765175469783666561851326464, 1),
 (273813765175469711573439842615296, 1),
 (273813765175469704853267723485184, 1),
 (273813765175469695841627472396288, 1),
 (273813765175469695001605957505024, 1),
 (273813765175469693875150926118912, 1),
 (273813765175469693770148236757504, 1),
 (273813765175469693629341357834240, 1),
 (273813765175469693616216021664064, 1),
 (273813765175469693596974494777384, 1),
 (273813765175469693594569303916549, 1),
 (273813765175469693594294290481152, 1),
 (273813765175469693594234278379520, 1),
 (273813765175469693594226776866816, 1),
 (273813765175469693594225839177728, 1),
 (273813765175469693594225705483776, 1),
 (273813765175469693594225705254848, 1),
 (273813765175469693594225705226232, 1),
 (273813765175469693594225705222655, 1),
 (273812684282450883105561191120896, 1),
 (273812684117167425698770595086336, 1),
 (273812684093629146073192986574848, 1),
 (273812684093601620248193029636096, 1),
 (273812684093564708569724569518080, 1),
 (273812684093561267841599574900736, 1),
 (273812684093556223790775393058816, 1),
 (273812684093555593284422370328576, 1),
 (273812684093555521191300361617408, 1),
 (273812684093555514471128242487296, 1),
 (273812684093555505459487991398400, 1),
 (273812684093555504619466476507136, 1),
 (273812684093555503493011445121024, 1),
 (273812684093555503388008755759616, 1),
 (273812684093555503247201876836352, 1),
 (273812684093555503234076540666176, 1),
 (273812684093555503214835013779496, 1),
 (273812684093555503212429822918661, 1),
 (273812684093555503212154809483264, 1),
 (273812684093555503212094797381632, 1),
 (273812684093555503212087295868928, 1),
 (273812684093555503212086358179840, 1),
 (273812684093555503212086224485888, 1),
 (273812684093555503212086224256960, 1),
 (273812684093555503212086224228344, 1),
 (273812684093555503212086224224767, 1),
 (273812548981928151901003159961600, 1),
 (273812548958389872275425551450112, 1),
 (273812548958362346450425594511360, 1),
 (273812548958325434771957134393344, 1),
 (273812548958321994043832139776000, 1),
 (273812548958316949993007957934080, 1),
 (273812548958316319486654935203840, 1),
 (273812548958316247393532926492672, 1),
 (273812548958316240673360807362560, 1),
 (273812548958316231661720556273664, 1),
 (273812548958316230821699041382400, 1),
 (273812548958316229695244009996288, 1),
 (273812548958316229590241320634880, 1),
 (273812548958316229449434441711616, 1),
 (273812548958316229436309105541440, 1),
 (273812548958316229417067578654760, 1),
 (273812548958316229414662387793925, 1),
 (273812548958316229414387374358528, 1),
 (273812548958316229414327362256896, 1),
 (273812548958316229414319860744192, 1),
 (273812548958316229414318923055104, 1),
 (273812548958316229414318789361152, 1),
 (273812548958316229414318789132224, 1),
 (273812548958316229414318789103608, 1),
 (273812548958316229414318789100031, 1),
 (273812544155715633371995741093888, 1),
 (273812543253749399773406772068352, 1),
 (273812541931481740519082003791872, 1),
 (273812541766198283112291407757312, 1),
 (273812541742595565983245382189056, 1),
 (273812541742592125255120387571712, 1),
 (273812541742587081204296205729792, 1),
 (273812541742586450697943182999552, 1),
 (273812541742586371884649055158272, 1),
 (273812541742586362032987289178112, 1),
 (273812541742586360660722689507328, 1),
 (273812541742586360647597353337152, 1),
 (273812541742586360628355826450472, 1),
 (273812541742586360625950635589637, 1),
 (273812541742586360625675622154240, 1),
 (273812541742586360625615610052608, 1),
 (273812541742586360625608108539904, 1),
 (273812541742586360625607170850816, 1),
 (273812541742586360625607037156864, 1),
 (273812541742586360625607036927936, 1),
 (273812541742586360625607036899320, 1),
 (273812541742586360625607036895743, 1),
 (273812532066484963050704622059520, 1),
 (273812532066457437225704665120768, 1),
 (273812532066420525547236205002752, 1),
 (273812532066417084819111210385408, 1),
 (273812532066412040768287028543488, 1),
 (273812532066411410261934005813248, 1),
 (273812532066411338168811997102080, 1),
 (273812532066411331448639877971968, 1),
 (273812532066411322436999626883072, 1),
 (273812532066411321596978111991808, 1),
 (273812532066411320470523080605696, 1),
 (273812532066411320365520391244288, 1),
 (273812532066411320224713512321024, 1),
 (273812532066411320211588176150848, 1),
 (273812532066411320192346649264168, 1),
 (273812532066411320189941458403333, 1),
 (273812532066411320189666444967936, 1),
 (273812532066411320189606432866304, 1),
 (273812532066411320189598931353600, 1),
 (273812532066411320189597993664512, 1),
 (273812532066411320189597859970560, 1),
 (273812532066411320189597859741632, 1),
 (273812532066411320189597859713016, 1),
 (273812532066411320189597859709439, 1),
 (273812531353340466484483857580032, 1),
 (273812531188057009077693261545472, 1),
 (273812531164491203627115696095232, 1),
 (273812531164445807169698059517952, 1),
 (273812531164445176663345036787712, 1),
 (273812531164445104570223028076544, 1),
 (273812531164445097850050908946432, 1),
 (273812531164445087998389142966272, 1),
 (273812531164445086766931422218752, 1),
 (273812531164445086593757680238632, 1),
 (273812531164445086591352489377797, 1),
 (273812531164445086591077475942400, 1),
 (273812531164445086591017463840768, 1),
 (273812531164445086591009962328064, 1),
 (273812531164445086591009024638976, 1),
 (273812531164445086591008890945024, 1),
 (273812531164445086591008890716096, 1),
 (273812531164445086591008890687480, 1),
 (273812531164445086591008890683903, 1),
 (273812529865789349823368493268992, 1),
 (273812529842223544372790927818752, 1),
 (273812529842183191966197473083392, 1),
 (273812529842177517409020268511232, 1),
 (273812529842177445315898259800064, 1),
 (273812529842177438595726140669952, 1),
 (273812529842177429584085889581056, 1),
 (273812529842177428744064374689792, 1),
 (273812529842177427512606653942272, 1),
 (273812529842177427358674438848832, 1),
 (273812529842177427337027721101317, 1),
 (273812529842177427336752707665920, 1),
 (273812529842177427336692695564288, 1),
 (273812529842177427336685194051584, 1),
 (273812529842177427336684256362496, 1),
 (273812529842177427336684122668544, 1),
 (273812529842177427336684122439616, 1),
 (273812529842177427336684122411000, 1),
 (273812529842177427336684122407423, 1),
 (273812529676967612791000288722944, 1),
 (273812529676940086966000331784192, 1),
 (273812529676899734559406877048832, 1),
 (273812529676894690508582695206912, 1),
 (273812529676893987909107663765504, 1),
 (273812529676893981188935544635392, 1),
 (273812529676893972177295293546496, 1),
 (273812529676893971337273778655232, 1),
 (273812529676893970210818747269120, 1),
 (273812529676893970105816057907712, 1),
 (273812529676893969951883842814272, 1),
 (273812529676893969932642315927592, 1),
 (273812529676893969929962111631360, 1),
 (273812529676893969929902099529728, 1),
 (273812529676893969929894598017024, 1),
 (273812529676893969929893660327936, 1),
 (273812529676893969929893526633984, 1),
 (273812529676893969929893526405056, 1),
 (273812529676893969929893526376440, 1),
 (273812529676893969929893526372863, 1),
 (273812529653355780376652063965184, 1),
 (273812529653355708283530055254016, 1),
 (273812529653355701563357936123904, 1),
 (273812529653355692551717685035008, 1),
 (273812529653355691711696170143744, 1),
 (273812529653355690585241138757632, 1),
 (273812529653355690480238449396224, 1),
 (273812529653355690339431570472960, 1),
 (273812529653355690326306234302784, 1),
 (273812529653355690307064707416104, 1),
 (273812529653355690304659516555269, 1),
 (273812529653355690304384503119872, 1),
 (273812529653355690304324491018240, 1),
 (273812529653355690304316989505536, 1),
 (273812529653355690304316051816448, 1),
 (273812529653355690304315918122496, 1),
 (273812529653355690304315917893568, 1),
 (273812529653355690304315917864952, 1),
 (273812529653355690304315917861375, 1),
 (273812529653337369836954306215936, 1),
 (273812529653333929108829311598592, 1),
 (273812529653328885058005129756672, 1),
 (273812529653328254551652107026432, 1),
 (273812529653328175738357979185152, 1),
 (273812529653328165886696213204992, 1),
 (273812529653328164514431613534208, 1),
 (273812529653328164501306277364032, 1),
 (273812529653328164482064750477352, 1),
 (273812529653328164479659559616517, 1),
 (273812529653328164479316094877696, 1),
 (273812529653328164479315961183744, 1),
 (273812529653328164479315960954816, 1),
 (273812529653328164479315960926200, 1),
 (273812529653328164479315960922623, 1),
 (273812529653291270780061638197248, 1),
 (273812529653291264059889519067136, 1),
 (273812529653291255048249267978240, 1),
 (273812529653291254208227753086976, 1),
 (273812529653291253081772721700864, 1),
 (273812529653291252976770032339456, 1),
 (273812529653291252835963153416192, 1),
 (273812529653291252822837817246016, 1),
 (273812529653291252803596290359336, 1),
 (273812529653291252801191099498501, 1),
 (273812529653291252800916086063104, 1),
 (273812529653291252800856073961472, 1),
 (273812529653291252800848572448768, 1),
 (273812529653291252800847634759680, 1),
 (273812529653291252800847501065728, 1),
 (273812529653291252800847500836800, 1),
 (273812529653291252800847500808184, 1),
 (273812529653291252800847500804607, 1),
 (273812529653288532651411675021312, 1),
 (273812529653287902145058652291072, 1),
 (273812529653287830051936643579904, 1),
 (273812529653287823331764524449792, 1),
 (273812529653287813480102758469632, 1),
 (273812529653287812248645037722112, 1),
 (273812529653287812075471295741992, 1),
 (273812529653287812073066104881157, 1),
 (273812529653287812072791091445760, 1),
 (273812529653287812072722506448384, 1),
 (273812529653287812072722506219456, 1),
 (273812529653287812072722506190840, 1),
 (273812529653287812072722506187263, 1),
 (273812529653282858094234470449152, 1),
 (273812529653282786001112461737984, 1),
 (273812529653282779280940342607872, 1),
 (273812529653282770269300091518976, 1),
 (273812529653282769429278576627712, 1),
 (273812529653282768197820855880192, 1),
 (273812529653282768043888640786752, 1),
 (273812529653282768022241923039237, 1),
 (273812529653282768021966909603840, 1),
 (273812529653282768021906897502208, 1),
 (273812529653282768021898324606464, 1),
 (273812529653282768021898324377536, 1),
 (273812529653282768021898324348920, 1),
 (273812529653282768021898324345343, 1),
 (273812529653282155494759439007744, 1),
 (273812529653282148774587319877632, 1),
 (273812529653282139762947068788736, 1),
 (273812529653282138922925553897472, 1),
 (273812529653282137796470522511360, 1),
 (273812529653282137691467833149952, 1),
 (273812529653282137537535618056512, 1),
 (273812529653282137518294091169832, 1),
 (273812529653282137515613886873600, 1),
 (273812529653282137515553874771968, 1),
 (273812529653282137515546373259264, 1),
 (273812529653282137515545301876224, 1),
 (273812529653282137515545301647296, 1),
 (273812529653282137515545301618680, 1),
 (273812529653282137515545301615103, 1),
 (273812529653282065457538945515520, 1),
 (273812529653282065444413609345344, 1),
 (273812529653282065425172082458664, 1),
 (273812529653282065422766891597829, 1),
 (273812529653282065422491878162432, 1),
 (273812529653282065422431866060800, 1),
 (273812529653282065422424364548096, 1),
 (273812529653282065422423426859008, 1),
 (273812529653282065422423293165056, 1),
 (273812529653282065422423292936128, 1),
 (273812529653282065422423292907512, 1),
 (273812529653282065422423292903935, 1),
 (273812529653282060949652940947456, 1),
 (273812529653282060109631426056192, 1),
 (273812529653282058983176394670080, 1),
 (273812529653282058878173705308672, 1),
 (273812529653282058737366826385408, 1),
 (273812529653282058724241490215232, 1),
 (273812529653282058704999963328552, 1),
 (273812529653282058702594772467717, 1),
 (273812529653282058702259746930688, 1),
 (273812529653282058702252245417984, 1),
 (273812529653282058702251307728896, 1),
 (273812529653282058702251173806016, 1),
 (273812529653282058702251173777400, 1),
 (273812529653282058702251173773823, 1),
 (273812529653282049693359712239656, 1),
 (273812529653282049690954521378821, 1),
 (273812529653282049690679507943424, 1),
 (273812529653282049690619495841792, 1),
 (273812529653282049690611994329088, 1),
 (273812529653282049690611056640000, 1),
 (273812529653282049690610922946048, 1),
 (273812529653282049690610922717120, 1),
 (273812529653282049690610922688504, 1),
 (273812529653282049690610922684927, 1),
 (273812529653282049131514628689920, 1),
 (273812529653282049026511939328512, 1),
 (273812529653282048885705060405248, 1),
 (273812529653282048872579724235072, 1),
 (273812529653282048853338197348392, 1),
 (273812529653282048850933006487557, 1),
 (273812529653282048850590479437824, 1),
 (273812529653282048850589541748736, 1),
 (273812529653282048850589407797240, 1),
 (273812529653282048850589407793663, 1),
 (273812529653282047724477975101445, 1),
 (273812529653282047724202961666048, 1),
 (273812529653282047724142949564416, 1),
 (273812529653282047724135448051712, 1),
 (273812529653282047724134510362624, 1),
 (273812529653282047724134376668672, 1),
 (273812529653282047724134376439744, 1),
 (273812529653282047724134376411128, 1),
 (273812529653282047724134376407551, 1),
 (273812529653282047654247339657728, 1),
 (273812529653282047641122003487552, 1),
 (273812529653282047621880476600872, 1),
 (273812529653282047619475285740037, 1),
 (273812529653282047619131821001216, 1),
 (273812529653282047619131687046143, 1),
 (273812529653282047478393393381376, 1),
 (273812529653282047478333381279744, 1),
 (273812529653282047478325879767040, 1),
 (273812529653282047478324942077952, 1),
 (273812529653282047478324808384000, 1),
 (273812529653282047478324808155072, 1),
 (273812529653282047478324808126456, 1),
 (273812529653282047478324808122879, 1),
 (273812529653282047467948261507432, 1),
 (273812529653282047465543070646597, 1),
 (273812529653282047465268057211200, 1),
 (273812529653282047465199472213824, 1),
 (273812529653282047446301543759917, 1),
 (273812529653282047446026530324520, 1),
 (273812529653282047445966518222888, 1),
 (273812529653282047445957945327144, 1),
 (273812529653282047445957945098216, 1),
 (273812529653282047443621339463685, 1),
 (273812529653282047443561327362053, 1),
 (273812529653282047443553825849349, 1),
 (273812529653282047443552754466309, 1),
 (273812529653282047443552754237381, 1),
 (273812529653282047443552754208765, 1),
 (273812529653282047443277874724864, 1),
 (273812529653282047443277741030912, 1),
 (273812529653282047443277740801984, 1),
 (273812529653282047443277740773368, 1),
 (273812529653282047443277740769791, 1),
 (273812529653282047443217728929280, 1),
 (273812529653282047443217728700352, 1),
 (273812529653282047443217728671736, 1),
 (273812529653282047443217728668159, 1),
 (273812529653282047443210227416576, 1),
 (273812529653282047443210227187648, 1),
 (273812529653282047443210227159032, 1),
 (273812529653282047443210227155455, 1),
 (273812529653282047443209289727488, 1),
 (273812529653282047443209289498560, 1),
 (273812529653282047443209289469944, 1),
 (273812529653282047443209289466367, 1),
 (273812529653282047443209155772415, 1),
 (202795004638473374413659834417152, 1),
 (202751676571814928699652950720512, 1),
 (202745641288280035080814750334976, 1),
 (202745506153040761283047315210240, 1),
 (202745498937310892494335563005952, 1),
 (202745489261135852058326385819648, 1),
 (202745488359169618459737416794112, 1),
 (202745487036901959205412648517632, 1),
 (202745486871618501798622052483072, 1),
 (202745486848080222173044443971584, 1),
 (202745486848052696348044487032832, 1),
 (202745486848015784669576026914816, 1),
 (202745486848012343941451032297472, 1),
 (202745486848007299890626850455552, 1),
 (202745486848006669384273827725312, 1),
 (202745486848006597291151819014144, 1),
 (202745486848006590570979699884032, 1),
 (202745486848006581559339448795136, 1),
 (202745486848006580719317933903872, 1),
 (202745486848006579592862902517760, 1),
 (202745486848006579487860213156352, 1),
 (202745486848006579347053334233088, 1),
 (202745486848006579333927998062912, 1),
 (202745486848006579314686471176232, 1),
 (202745486848006579312281280315397, 1),
 (202745486848006579312006266880000, 1),
 (202745486848006579311946254778368, 1),
 (202745486848006579311938753265664, 1),
 (202745486848006579311937815576576, 1),
 (202745486848006579311937681882624, 1),
 (202745486848006579311937681653696, 1),
 (202745486848006579311937681625080, 1),
 (202745486848006579311937681621503, 1),
 (167326784407624486753139611926528, 1),
 (167320749124089593134301411540992, 1),
 (167320613988850319336533976416256, 1),
 (167320606773120450547822224211968, 1),
 (167320597096945410111813047025664, 1),
 (167320596194979176513224078000128, 1),
 (167320594872711517258899309723648, 1),
 (167320594707428059852108713689088, 1),
 (167320594683889780226531105177600, 1),
 (167320594683862254401531148238848, 1),
 (167320594683825342723062688120832, 1),
 (167320594683821901994937693503488, 1),
 (167320594683816857944113511661568, 1),
 (167320594683816227437760488931328, 1),
 (167320594683816155344638480220160, 1),
 (167320594683816148624466361090048, 1),
 (167320594683816139612826110001152, 1),
 (167320594683816138772804595109888, 1),
 (167320594683816137646349563723776, 1),
 (167320594683816137541346874362368, 1),
 (167320594683816137400539995439104, 1),
 (167320594683816137387414659268928, 1),
 (167320594683816137368173132382248, 1),
 (167320594683816137365767941521413, 1),
 (167320594683816137365492928086016, 1),
 (167320594683816137365432915984384, 1),
 (167320594683816137365425414471680, 1),
 (167320594683816137365424476782592, 1),
 (167320594683816137365424343088640, 1),
 (167320594683816137365424342859712, 1),
 (167320594683816137365424342831096, 1),
 (167320594683816137365424342827519, 1),
 (166061621753167218632327954432000, 1),
 (165825176716826750125631724322816, 1),
 (165478552183559184413576654749696, 1),
 (165435224116900738699569771053056, 1),
 (165429036806221662058243206152192, 1),
 (165429035904255428459654237126656, 1),
 (165429034581987769205329468850176, 1),
 (165429034416704311798538872815616, 1),
 (165429034393101594669492847247360, 1),
 (165429034393098153941367852630016, 1),
 (165429034393093109890543670788096, 1),
 (165429034393092479384190648057856, 1),
 (165429034393092407291068639346688, 1),
 (165429034393092400570896520216576, 1),
 (165429034393092391559256269127680, 1),
 (165429034393092390719234754236416, 1),
 (165429034393092389592779722850304, 1),
 (165429034393092389487777033488896, 1),
 (165429034393092389346970154565632, 1),
 (165429034393092389333844818395456, 1),
 (165429034393092389314603291508776, 1),
 (165429034393092389312198100647941, 1),
 (165429034393092389311923087212544, 1),
 (165429034393092389311863075110912, 1),
 (165429034393092389311855573598208, 1),
 (165429034393092389311854635909120, 1),
 (165429034393092389311854502215168, 1),
 (165429034393092389311854501986240, 1),
 (165429034393092389311854501957624, 1),
 (165429034393092389311854501954047, 1),
 (162892637603565787890987244191744, 1),
 (162892502468326514093219809067008, 1),
 (162892495252596645304508056862720, 1),
 (162892485576421604868498879676416, 1),
 (162892484674455371269909910650880, 1),
 (162892483352187712015585142374400, 1),
 (162892483186904254608794546339840, 1),
 (162892483163365974983216937828352, 1),
 (162892483163338449158216980889600, 1),
 (162892483163301537479748520771584, 1),
 (162892483163298096751623526154240, 1),
 (162892483163293052700799344312320, 1),
 (162892483163292422194446321582080, 1),
 (162892483163292350101324312870912, 1),
 (162892483163292343381152193740800, 1),
 (162892483163292334369511942651904, 1),
 (162892483163292333529490427760640, 1),
 (162892483163292332403035396374528, 1),
 (162892483163292332298032707013120, 1),
 (162892483163292332157225828089856, 1),
 (162892483163292332144100491919680, 1),
 (162892483163292332124858965033000, 1),
 (162892483163292332122453774172165, 1),
 (162892483163292332122178760736768, 1),
 (162892483163292332122118748635136, 1),
 (162892483163292332122111247122432, 1),
 (162892483163292332122110309433344, 1),
 (162892483163292332122110175739392, 1),
 (162892483163292332122110175510464, 1),
 (162892483163292332122110175481848, 1),
 (162892483163292332122110175478271, 1),
 (162705555917418658717136098164736, 1),
 (162662227850760213003129214468096, 1),
 (162656050216256176797811826753536, 1),
 (162656038315847243508888912265216, 1),
 (162656038150563786102098316230656, 1),
 (162656038126997980651520750780416, 1),
 (162656038126952584194103114203136, 1),
 (162656038126951953687750091472896, 1),
 (162656038126951881594628082761728, 1),
 (162656038126951874874455963631616, 1),
 (162656038126951865862815712542720, 1),
 (162656038126951865022794197651456, 1),
 (162656038126951863896339166265344, 1),
 (162656038126951863791336476903936, 1),
 (162656038126951863650529597980672, 1),
 (162656038126951863637404261810496, 1),
 (162656038126951863618162734923816, 1),
 (162656038126951863615757544062981, 1),
 (162656038126951863615482530627584, 1),
 (162656038126951863615422518525952, 1),
 (162656038126951863615415017013248, 1),
 (162656038126951863615414079324160, 1),
 (162656038126951863615413945630208, 1),
 (162656038126951863615413945401280, 1),
 (162656038126951863615413945372664, 1),
 (162656038126951863615413945369087, 1),
 (162315603317492647291074144894976, 1),
 (162309568033957753672235944509440, 1),
 (162309425682988611085756757180416, 1),
 (162309415104847337051158610968576, 1),
 (162309413617296220390043246657536, 1),
 (162309413593730414939465681207296, 1),
 (162309413593690062532872226471936, 1),
 (162309413593684387975695021899776, 1),
 (162309413593684315882573013188608, 1),
 (162309413593684309162400894058496, 1),
 (162309413593684300150760642969600, 1),
 (162309413593684299310739128078336, 1),
 (162309413593684298184284096692224, 1),
 (162309413593684298079281407330816, 1),
 (162309413593684297938474528407552, 1),
 (162309413593684297925349192237376, 1),
 (162309413593684297906107665350696, 1),
 (162309413593684297903702474489861, 1),
 (162309413593684297903427461054464, 1),
 (162309413593684297903367448952832, 1),
 (162309413593684297903359947440128, 1),
 (162309413593684297903359009751040, 1),
 (162309413593684297903358876057088, 1),
 (162309413593684297903358875828160, 1),
 (162309413593684297903358875799544, 1),
 (162309413593684297903358875795967, 1),
 (162266239967299307958229060812800, 1),
 (162266104832060034160461625688064, 1),
 (162266097616330165371749873483776, 1),
 (162266087038188891337151727271936, 1),
 (162266085715921232082826958995456, 1),
 (162266085527099495050458754449408, 1),
 (162266085527071969225458797510656, 1),
 (162266085527031616818865342775296, 1),
 (162266085527026572768041160933376, 1),
 (162266085527025870168566129491968, 1),
 (162266085527025863448394010361856, 1),
 (162266085527025854436753759272960, 1),
 (162266085527025853596732244381696, 1),
 (162266085527025852470277212995584, 1),
 (162266085527025852365274523634176, 1),
 (162266085527025852224467644710912, 1),
 (162266085527025852211342308540736, 1),
 (162266085527025852192100781654056, 1),
 (162266085527025852189695590793221, 1),
 (162266085527025852189420577357824, 1),
 (162266085527025852189360565256192, 1),
 (162266085527025852189353063743488, 1),
 (162266085527025852189352126054400, 1),
 (162266085527025852189351992360448, 1),
 (162266085527025852189351992131520, 1),
 (162266085527025852189351992102904, 1),
 (162266085527025852189351992099327, 1),
 (162260050432386338463988758609920, 1),
 (162260050267102881057198162575360, 1),
 (162260050243564601431620554063872, 1),
 (162260050243537075606620597125120, 1),
 (162260050243500163928152137007104, 1),
 (162260050243496723200027142389760, 1),
 (162260050243491679149202960547840, 1),
 (162260050243491048642849937817600, 1),
 (162260050243490976549727929106432, 1),
 (162260050243490969829555809976320, 1),
 (162260050243490960817915558887424, 1),
 (162260050243490959977894043996160, 1),
 (162260050243490958851439012610048, 1),
 (162260050243490958746436323248640, 1),
 (162260050243490958605629444325376, 1),
 (162260050243490958592504108155200, 1),
 (162260050243490958573262581268520, 1),
 (162260050243490958570857390407685, 1),
 (162260050243490958570582376972288, 1),
 (162260050243490958570522364870656, 1),
 (162260050243490958570514863357952, 1),
 (162260050243490958570513925668864, 1),
 (162260050243490958570513791974912, 1),
 (162260050243490958570513791745984, 1),
 (162260050243490958570513791717368, 1),
 (162260050243490958570513791713791, 1),
 (162259915131863607259430727450624, 1),
 (162259915108325327633853118939136, 1),
 (162259915108297801808853162000384, 1),
 (162259915108260890130384701882368, 1),
 (162259915108257449402259707265024, 1),
 (162259915108252405351435525423104, 1),
 (162259915108251774845082502692864, 1),
 (162259915108251702751960493981696, 1),
 (162259915108251696031788374851584, 1),
 (162259915108251687020148123762688, 1),
 (162259915108251686180126608871424, 1),
 (162259915108251685053671577485312, 1),
 (162259915108251684948668888123904, 1),
 (162259915108251684807862009200640, 1),
 (162259915108251684794736673030464, 1),
 (162259915108251684775495146143784, 1),
 (162259915108251684773089955282949, 1),
 (162259915108251684772814941847552, 1),
 (162259915108251684772754929745920, 1),
 (162259915108251684772747428233216, 1),
 (162259915108251684772746490544128, 1),
 (162259915108251684772746356850176, 1),
 (162259915108251684772746356621248, 1),
 (162259915108251684772746356592632, 1),
 (162259915108251684772746356589055, 1),
 (162259910305651088730423308582912, 1),
 (162259909403684855131834339557376, 1),
 (162259908081417195877509571280896, 1),
 (162259907916133738470718975246336, 1),
 (162259907892531021341672949678080, 1),
 (162259907892527580613547955060736, 1),
 (162259907892522536562723773218816, 1),
 (162259907892521906056370750488576, 1),
 (162259907892521827243076622647296, 1),
 (162259907892521817391414856667136, 1),
 (162259907892521816019150256996352, 1),
 (162259907892521816006024920826176, 1),
 (162259907892521815986783393939496, 1),
 (162259907892521815984378203078661, 1),
 (162259907892521815984103189643264, 1),
 (162259907892521815984043177541632, 1),
 (162259907892521815984035676028928, 1),
 (162259907892521815984034738339840, 1),
 (162259907892521815984034604645888, 1),
 (162259907892521815984034604416960, 1),
 (162259907892521815984034604388344, 1),
 (162259907892521815984034604384767, 1),
 (162259898216420418409132189548544, 1),
 (162259898216392892584132232609792, 1),
 (162259898216355980905663772491776, 1),
 (162259898216352540177538777874432, 1),
 (162259898216347496126714596032512, 1),
 (162259898216346865620361573302272, 1),
 (162259898216346793527239564591104, 1),
 (162259898216346786807067445460992, 1),
 (162259898216346777795427194372096, 1),
 (162259898216346776955405679480832, 1),
 (162259898216346775828950648094720, 1),
 (162259898216346775723947958733312, 1),
 (162259898216346775583141079810048, 1),
 (162259898216346775570015743639872, 1),
 (162259898216346775550774216753192, 1),
 (162259898216346775548369025892357, 1),
 (162259898216346775548094012456960, 1),
 (162259898216346775548034000355328, 1),
 (162259898216346775548026498842624, 1),
 (162259898216346775548025561153536, 1),
 (162259898216346775548025427459584, 1),
 (162259898216346775548025427230656, 1),
 (162259898216346775548025427202040, 1),
 (162259898216346775548025427198463, 1),
 (162259897503275921842911425069056, 1),
 (162259897337992464436120829034496, 1),
 (162259897314426658985543263584256, 1),
 (162259897314381262528125627006976, 1),
 (162259897314380632021772604276736, 1),
 (162259897314380559928650595565568, 1),
 (162259897314380553208478476435456, 1),
 (162259897314380543356816710455296, 1),
 (162259897314380542125358989707776, 1),
 (162259897314380541952185247727656, 1),
 (162259897314380541949780056866821, 1),
 (162259897314380541949505043431424, 1),
 (162259897314380541949445031329792, 1),
 (162259897314380541949437529817088, 1),
 (162259897314380541949436592128000, 1),
 (162259897314380541949436458434048, 1),
 (162259897314380541949436458205120, 1),
 (162259897314380541949436458176504, 1),
 (162259897314380541949436458172927, 1),
 (162259896015724805181796060758016, 1),
 (162259895992158999731218495307776, 1),
 (162259895992118647324625040572416, 1),
 (162259895992112972767447836000256, 1),
 (162259895992112900674325827289088, 1),
 (162259895992112893954153708158976, 1),
 (162259895992112884942513457070080, 1),
 (162259895992112884102491942178816, 1),
 (162259895992112882871034221431296, 1),
 (162259895992112882717102006337856, 1),
 (162259895992112882695455288590341, 1),
 (162259895992112882695180275154944, 1),
 (162259895992112882695120263053312, 1),
 (162259895992112882695112761540608, 1),
 (162259895992112882695111823851520, 1),
 (162259895992112882695111690157568, 1),
 (162259895992112882695111689928640, 1),
 (162259895992112882695111689900024, 1),
 (162259895992112882695111689896447, 1),
 (162259895826903068149427856211968, 1),
 (162259895826875542324427899273216, 1),
 (162259895826835189917834444537856, 1),
 (162259895826830145867010262695936, 1),
 (162259895826829443267535231254528, 1),
 (162259895826829436547363112124416, 1),
 (162259895826829427535722861035520, 1),
 (162259895826829426695701346144256, 1),
 (162259895826829425569246314758144, 1),
 (162259895826829425464243625396736, 1),
 (162259895826829425310311410303296, 1),
 (162259895826829425291069883416616, 1),
 (162259895826829425288389679120384, 1),
 (162259895826829425288329667018752, 1),
 (162259895826829425288322165506048, 1),
 (162259895826829425288321227816960, 1),
 (162259895826829425288321094123008, 1),
 (162259895826829425288321093894080, 1),
 (162259895826829425288321093865464, 1),
 (162259895826829425288321093861887, 1),
 (162259895803291235735079631454208, 1),
 (162259895803291163641957622743040, 1),
 (162259895803291156921785503612928, 1),
 (162259895803291147910145252524032, 1),
 (162259895803291147070123737632768, 1),
 (162259895803291145943668706246656, 1),
 (162259895803291145838666016885248, 1),
 (162259895803291145697859137961984, 1),
 (162259895803291145684733801791808, 1),
 (162259895803291145665492274905128, 1),
 (162259895803291145663087084044293, 1),
 (162259895803291145662812070608896, 1),
 (162259895803291145662752058507264, 1),
 (162259895803291145662744556994560, 1),
 (162259895803291145662743619305472, 1),
 (162259895803291145662743485611520, 1),
 (162259895803291145662743485382592, 1),
 (162259895803291145662743485353976, 1),
 (162259895803291145662743485350399, 1),
 (162259895803272825195381873704960, 1),
 (162259895803269384467256879087616, 1),
 (162259895803264340416432697245696, 1),
 (162259895803263709910079674515456, 1),
 (162259895803263631096785546674176, 1),
 (162259895803263621245123780694016, 1),
 (162259895803263619872859181023232, 1),
 (162259895803263619859733844853056, 1),
 (162259895803263619840492317966376, 1),
 (162259895803263619838087127105541, 1),
 (162259895803263619837743662366720, 1),
 (162259895803263619837743528672768, 1),
 (162259895803263619837743528443840, 1),
 (162259895803263619837743528415224, 1),
 (162259895803263619837743528411647, 1),
 (162259895803226726138489205686272, 1),
 (162259895803226719418317086556160, 1),
 (162259895803226710406676835467264, 1),
 (162259895803226709566655320576000, 1),
 (162259895803226708440200289189888, 1),
 (162259895803226708335197599828480, 1),
 (162259895803226708194390720905216, 1),
 (162259895803226708181265384735040, 1),
 (162259895803226708162023857848360, 1),
 (162259895803226708159618666987525, 1),
 (162259895803226708159343653552128, 1),
 (162259895803226708159283641450496, 1),
 (162259895803226708159276139937792, 1),
 (162259895803226708159275202248704, 1),
 (162259895803226708159275068554752, 1),
 (162259895803226708159275068325824, 1),
 (162259895803226708159275068297208, 1),
 (162259895803226708159275068293631, 1),
 (162259895803223988009839242510336, 1),
 (162259895803223357503486219780096, 1),
 (162259895803223285410364211068928, 1),
 (162259895803223278690192091938816, 1),
 (162259895803223268838530325958656, 1),
 (162259895803223267607072605211136, 1),
 (162259895803223267433898863231016, 1),
 (162259895803223267431493672370181, 1),
 (162259895803223267431218658934784, 1),
 (162259895803223267431150073937408, 1),
 (162259895803223267431150073708480, 1),
 (162259895803223267431150073679864, 1),
 (162259895803223267431150073676287, 1),
 (162259895803218313452662037938176, 1),
 (162259895803218241359540029227008, 1),
 (162259895803218234639367910096896, 1),
 (162259895803218225627727659008000, 1),
 (162259895803218224787706144116736, 1),
 (162259895803218223556248423369216, 1),
 (162259895803218223402316208275776, 1),
 (162259895803218223380669490528261, 1),
 (162259895803218223380394477092864, 1),
 (162259895803218223380334464991232, 1),
 (162259895803218223380325892095488, 1),
 (162259895803218223380325891866560, 1),
 (162259895803218223380325891837944, 1),
 (162259895803218223380325891834367, 1),
 (162259895803217610853187006496768, 1),
 (162259895803217604133014887366656, 1),
 (162259895803217595121374636277760, 1),
 (162259895803217594281353121386496, 1),
 (162259895803217593154898090000384, 1),
 ...]

In [118]:
g1


Out[118]:
<networkx.classes.graph.Graph at 0x247f1e1f978>

In [122]:
list(g1.edges())[:3]


Out[122]:
[(32, 45), (32, 44), (32, 6)]

In [124]:
g1[32], g1[45]


Out[124]:
(AtlasView({45: {}, 44: {}, 6: {}}),
 AtlasView({32: {}, 49: {}, 47: {}, 31: {}}))

In [128]:
g1.node[47]['soln_distance']


Out[128]:
0

In [137]:
g1.edges[(32,45)].intra_partition


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-137-095ebeb43cc9> in <module>()
----> 1 g1.edges[(32,45)].delete('foo')

AttributeError: 'dict' object has no attribute 'delete'

In [132]:
g1.edges[(32,45)]


Out[132]:
{'foo': 3}

In [ ]: